forked from hush/hsc-creator
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
114 lines
3.8 KiB
114 lines
3.8 KiB
new Vue({
|
|
el: '#app',
|
|
data: {
|
|
name: 'TUSH',
|
|
flavor: '',
|
|
path: '',
|
|
command: '',
|
|
peersList: [
|
|
],
|
|
optionz2z: 1,
|
|
optionServer: 1,
|
|
optionTor: 0,
|
|
optionGen: 0,
|
|
optionGenProcLimit: 2,
|
|
optionEquihashSolver: 'tromp',
|
|
optionAllowList: [],
|
|
tempAllowlist: '',
|
|
customPath: 0,
|
|
customMinerToAddress: 0,
|
|
optionName: 'TUSH',
|
|
optionPubkey: '',
|
|
optionReward: '1250000000', // in puposhis
|
|
optionz2z: 1,
|
|
optionSupply: '21000000',
|
|
optionBlocktime: 60,
|
|
optionHalving: 210000,
|
|
optionRpcAllowIp: '127.0.0.1',
|
|
optionRpcUser: 'rpcuser',
|
|
optionRpcPassword: Math.random().toString(36).slice(2),
|
|
optionShowMetrics: 0,
|
|
optionDataDir: '',
|
|
optionZIndex: 0,
|
|
optionAddrIndex: 0,
|
|
optionSpentIndex: 0,
|
|
optionTimestampIndex: 0
|
|
},
|
|
methods: {
|
|
setFlavor: function (option) {
|
|
this.flavor = option
|
|
if (this.flavor == 'Linux') {
|
|
this.path = '/home/user/.komodo/HUSH3.conf'
|
|
} else if (this.flavor == "Mac OS") {
|
|
this.path = '~/Library/Application Support/Komodo/HUSH3.conf'
|
|
} else {
|
|
this.path = 'C:\\Users\\your_username\\AppData\\Roaming\\Komodo\\HUSH3.conf'
|
|
}
|
|
$('.flavor-banner').show()
|
|
$(document.body).animate({
|
|
'scrollTop': $('#build').offset().top
|
|
}, 1200);
|
|
},
|
|
showPathInput: function () {
|
|
$('#paths').toggle()
|
|
},
|
|
pickPath: function () {
|
|
|
|
},
|
|
showMinerInfo: function () {
|
|
$('#threads').toggle()
|
|
$('#minerAddress').toggle()
|
|
|
|
if (this.customMinerToAddress == 1) {
|
|
$('#minerInput').toggle()
|
|
}
|
|
},
|
|
showMinerAddress: function () {
|
|
$('#minerInput').toggle()
|
|
},
|
|
decreaseThreads: function () {
|
|
if (this.optionGenProcLimit != 0) {
|
|
this.optionGenProcLimit--
|
|
}
|
|
},
|
|
increaseThreads: function () {
|
|
this.optionGenProcLimit++
|
|
},
|
|
addAllowList: function (value) {
|
|
this.optionAllowList.push(value)
|
|
this.tempAllowlist = ''
|
|
},
|
|
removeAllowListItem: function (item) {
|
|
console.log(item)
|
|
var index = this.optionAllowList.indexOf(item)
|
|
this.optionAllowList.splice(index, 1)
|
|
},
|
|
compile: function () {
|
|
var currentdate = new Date();
|
|
var compileTime = currentdate.getDate() + "/"
|
|
+ (currentdate.getMonth()+1) + "/"
|
|
+ currentdate.getFullYear() + " @ "
|
|
+ currentdate.getHours() + ":"
|
|
+ currentdate.getMinutes() + ":"
|
|
+ currentdate.getSeconds()
|
|
this.command = "git clone https://git.hush.is/hush/hush3<br/>cd hush3<br/>./build.sh<br/>cd src<br/>./<b>hush-smart-chain</b> -ac_name=" + this.optionName + " -ac_supply=" + this.optionSupply
|
|
+ " -ac_blocktime=" + this.optionBlocktime + " -ac_private=" + this.optionz2z;
|
|
this.command += " -ac_reward=" + this.optionReward + " -ac_halving=" + this.optionHalving;
|
|
if(this.optionPubkey != '')
|
|
this.command += " -ac_pubkey=" + this.optionPubkey;
|
|
/*
|
|
if (this.optionAllowList.length != 0) {
|
|
this.command = this.conf + "<br /><br />whitelist=" + this.optionAllowList
|
|
}
|
|
for (var i = 0; i< this.peersList.length; i++) {
|
|
if (i == 0) {
|
|
this.command = this.conf + "<br />"
|
|
}
|
|
this.command = this.conf + "<br />addnode=" + this.peersList[i]
|
|
}
|
|
*/
|
|
$('#profile').show()
|
|
$('#clapping').show();
|
|
}
|
|
}
|
|
});
|
|
|