Compare commits

...

3 Commits

Author SHA1 Message Date
Jonathan "Duke" Leto
fd4b363696 Disable 'select your flavor' as it does nothing and wastes space 2023-01-16 14:15:49 -08:00
Jonathan "Duke" Leto
647b24c43a Update path 2023-01-16 14:00:55 -08:00
Jonathan "Duke" Leto
0c16c83372 Add option for -testnode and -gen=1 with other small tweaks 2023-01-16 13:56:03 -08:00
3 changed files with 33 additions and 6 deletions

View File

@ -16,11 +16,13 @@
<img src="logo.jpg" />
</div>
<h1>Hush Smart Chain Creator</h1>
<!--
<h4>Select your flavor</h4>
<ul id="flavor">
<li><button class="button-white button-outline" v-on:click="setFlavor('z2z')">Full Privacy (z2z)</button></li>
<li><button class="button-white button-outline" v-on:click="setFlavor('hybrid')">Hybrid Privacy (Smart contracts)</button></li>
</ul>
-->
</div>
<div id="build" class="content text-center">
<h3>Let's create a HUSH Smart Chain!</h3>
@ -72,6 +74,7 @@
</li>
<li class="animated fadeInRight" id="rewardInput" style="border-color: #2d2d2d;">
<label>Initial Block Reward (-ac_reward)</label>
<pre>This is in satoshis. 1 COIN = 100000000 satoshis.</pre>
<input class="input" type="text" v-model="optionReward" style="border-color: #2d2d2d;">
</li>
<li class="animated fadeInRight" id="blocktimeInput" style="border-color: #2d2d2d;">
@ -95,6 +98,25 @@
</ul>
</div>
</div>
<li>
<label> Test Chain (-testnode=1)</label>
<pre>Use this for testing. Requires only a single node.</pre>
<label class="switch">
<input type="checkbox" v-model="optionTestNode">
<div class="slider round"></div>
</label>
</li>
<li>
<label> Mining (-gen=1)</label>
<pre>Enable mining.</pre>
<label class="switch">
<input type="checkbox" v-model="optionGen">
<div class="slider round"></div>
</label>
</li>
</fieldset>
</form>
<button class="compile button-dark" v-on:click="compile">Compile</button>
@ -119,6 +141,6 @@
</div>
<script src='https://cdn.jsdelivr.net/npm/vue@2.6.0'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js'></script>
<script src='main.js?v=7'></script>
<script src='main.js?v=8'></script>
</body>
</html>

11
main.js
View File

@ -28,6 +28,7 @@ new Vue({
optionRpcAllowIp: '127.0.0.1',
optionRpcUser: 'rpcuser',
optionRpcPassword: Math.random().toString(36).slice(2),
optionTestNode: 0,
optionShowMetrics: 0,
optionDataDir: '',
optionZIndex: 0,
@ -39,11 +40,11 @@ new Vue({
setFlavor: function (option) {
this.flavor = option
if (this.flavor == 'Linux') {
this.path = '/home/user/.komodo/HUSH3.conf'
this.path = '/home/user/.hush/HUSH3.conf'
} else if (this.flavor == "Mac OS") {
this.path = '~/Library/Application Support/Komodo/HUSH3.conf'
this.path = '~/Library/Application Support/Hush/HUSH3.conf'
} else {
this.path = 'C:\\Users\\your_username\\AppData\\Roaming\\Komodo\\HUSH3.conf'
this.path = 'C:\\Users\\your_username\\AppData\\Roaming\\Hush\\HUSH3.conf'
}
$('.flavor-banner').show()
$(document.body).animate({
@ -97,6 +98,10 @@ new Vue({
this.command += " -ac_reward=" + this.optionReward + " -ac_halving=" + this.optionHalving;
if(this.optionPubkey != '')
this.command += " -ac_pubkey=" + this.optionPubkey;
if(this.optionTestNode)
this.command += " -testnode=1";
if(this.optionGen)
this.command += " -gen=1";
/*
if (this.optionAllowList.length != 0) {
this.command = this.conf + "<br /><br />whitelist=" + this.optionAllowList

View File

@ -7,11 +7,11 @@ body {
}
.column {
width: 40%;
width: 45%;
}
.row {
width: 90%;
width: 95%;
}
.center {