Add mining pool stats enable/disable toggle

This commit is contained in:
kdmukai 2024-12-18 15:57:38 -06:00
parent 52ab8df77a
commit 45c02f3651
3 changed files with 19 additions and 6 deletions

View file

@ -44,6 +44,7 @@
"useNostr": "Use Nostr data source", "useNostr": "Use Nostr data source",
"bitaxeHostname": "BitAxe hostname or IP", "bitaxeHostname": "BitAxe hostname or IP",
"bitaxeEnabled": "Enable BitAxe", "bitaxeEnabled": "Enable BitAxe",
"miningPoolStatsEnabled": "Enable Mining Pool Stats",
"miningPoolName": "Mining Pool", "miningPoolName": "Mining Pool",
"miningPoolUser": "Mining Pool username or api key", "miningPoolUser": "Mining Pool username or api key",
"nostrZapPubkey": "Nostr Zap pubkey", "nostrZapPubkey": "Nostr Zap pubkey",

View file

@ -705,14 +705,16 @@
> >
<Col md="6"> <Col md="6">
<Input <Input
type="text" type="select"
bind:value={$settings.miningPoolName} bind:value={$settings.miningPoolName}
name="miningPoolName" name="miningPoolName"
id="miningPoolName" id="miningPoolName"
bsSize={$uiSettings.inputSize} bsSize={$uiSettings.inputSize}
required class={$uiSettings.selectClass}
minlength="64" >
></Input> <option value="braiins">Braiins Pool</option>
<option value="ocean">Ocean</option>
</Input>
</Col> </Col>
</Row> </Row>
<Row> <Row>
@ -727,7 +729,6 @@
id="miningPoolUser" id="miningPoolUser"
bsSize={$uiSettings.inputSize} bsSize={$uiSettings.inputSize}
required required
minlength="64"
></Input> ></Input>
</Col> </Col>
</Row> </Row>
@ -811,6 +812,17 @@
/> />
</Col> </Col>
{/if} {/if}
{#if 'miningPoolStatsEnabled' in $settings}
<Col md="6" xl="12" xxl="6">
<Input
id="miningPoolStatsEnabled"
bind:checked={$settings.miningPoolStatsEnabled}
type="switch"
bsSize={$uiSettings.inputSize}
label="{$_('section.settings.miningPoolStatsEnabled')} ({$_('restartRequired')})"
/>
</Col>
{/if}
{#if 'nostrZapNotify' in $settings} {#if 'nostrZapNotify' in $settings}
<Col md="6" xl="12" xxl="6"> <Col md="6" xl="12" xxl="6">
<Input <Input

View file

@ -45,7 +45,7 @@ export const settingsJson = {
gitTag: '3.1.9', gitTag: '3.1.9',
bitaxeEnabled: false, bitaxeEnabled: false,
bitaxeHostname: 'bitaxe1', bitaxeHostname: 'bitaxe1',
miningPoolStatsEnabled: true, miningPoolStatsEnabled: false,
miningPoolName: 'ocean', miningPoolName: 'ocean',
miningPoolUser: '38Qkkei3SuF1Eo45BaYmRHUneRD54yyTFy', miningPoolUser: '38Qkkei3SuF1Eo45BaYmRHUneRD54yyTFy',
nostrZapNotify: true, nostrZapNotify: true,