Add nostr zap WebUI settings

This commit is contained in:
Djuri Baars 2024-08-24 16:02:49 +03:00
parent be5647e1a5
commit 876f3b01d8
2 changed files with 35 additions and 1 deletions

View file

@ -38,10 +38,13 @@
"luxLightToggle": "Auto toggle frontlight at lux", "luxLightToggle": "Auto toggle frontlight at lux",
"wpTimeout": "WiFi-config portal timeout", "wpTimeout": "WiFi-config portal timeout",
"nostrPubKey": "Nostr source pubkey", "nostrPubKey": "Nostr source pubkey",
"nostrZapKey": "Nostr zap pubkey",
"nostrRelay": "Nostr Relay", "nostrRelay": "Nostr Relay",
"nostrZapNotify": "Nostr Zap Notifications",
"useNostr": "Use Nostr datasource", "useNostr": "Use Nostr datasource",
"bitaxeHostname": "BitAxe hostname", "bitaxeHostname": "BitAxe hostname",
"bitaxeEnabled": "Enable BitAxe" "bitaxeEnabled": "Enable BitAxe",
"nostrZapPubkey": "Nostr Zap pubkey"
}, },
"control": { "control": {
"systemInfo": "System info", "systemInfo": "System info",

View file

@ -299,6 +299,24 @@
</Col> </Col>
</Row> </Row>
{/if} {/if}
{#if 'nostrZapNotify' in $settings}
<Row>
<Label md={6} for="nostrZapPubkey" size={$uiSettings.inputSize}
>{$_('section.settings.nostrZapPubkey')}</Label
>
<Col md="6">
<Input
type="text"
bind:value={$settings.nostrZapPubkey}
name="nostrZapPubkey"
id="nostrZapPubkey"
on:change={checkValidNostrPubkey}
invalid={!isValidHexPubKey($settings.nostrZapPubkey)}
bsSize={$uiSettings.inputSize}
></Input>
</Col>
</Row>
{/if}
{#if $settings.useNostr} {#if $settings.useNostr}
<Row> <Row>
<Label md={6} for="nostrPubKey" size={$uiSettings.inputSize} <Label md={6} for="nostrPubKey" size={$uiSettings.inputSize}
@ -316,6 +334,8 @@
></Input> ></Input>
</Col> </Col>
</Row> </Row>
{/if}
{#if 'nostrZapNotify' in $settings || $settings.useNostr}
<Row> <Row>
<Label md={6} for="nostrRelay" size={$uiSettings.inputSize} <Label md={6} for="nostrRelay" size={$uiSettings.inputSize}
>{$_('section.settings.nostrRelay')}</Label >{$_('section.settings.nostrRelay')}</Label
@ -536,6 +556,17 @@
/> />
</Col> </Col>
{/if} {/if}
{#if 'nostrZapNotify' in $settings}
<Col md="6">
<Input
id="nostrZapNotify"
bind:checked={$settings.nostrZapNotify}
type="switch"
bsSize={$uiSettings.inputSize}
label="{$_('section.settings.nostrZapNotify')} ({$_('restartRequired')})"
/>
</Col>
{/if}
{#if 'bitaxeEnabled' in $settings} {#if 'bitaxeEnabled' in $settings}
<Col md="6"> <Col md="6">
<Input <Input