Allow disabling frontlight

This commit is contained in:
Djuri Baars 2024-09-02 22:38:11 +02:00
parent e21b9895a7
commit 2c7f7f667c
6 changed files with 69 additions and 53 deletions

View file

@ -37,7 +37,8 @@
"mempoolInstanceHelpText": "Nur wirksam, wenn die BTClock-Datenquelle deaktiviert ist. \nZur Anwendung ist ein Neustart erforderlich.",
"luxLightToggle": "Automatisches Umschalten des Frontlichts bei Lux",
"wpTimeout": "WiFi-Konfigurationsportal timeout",
"useNostr": "Nostr-Datenquelle verwenden"
"useNostr": "Nostr-Datenquelle verwenden",
"flDisable": "Displaybeleuchtung deaktivieren"
},
"control": {
"systemInfo": "Systeminfo",

View file

@ -46,7 +46,8 @@
"bitaxeEnabled": "Enable BitAxe",
"nostrZapPubkey": "Nostr Zap pubkey",
"invalidNostrPubkey": "Invalid Nostr pubkey, note that your pubkey does NOT start with npub.",
"convertingValidNpub": "Converting valid npub to pubkey"
"convertingValidNpub": "Converting valid npub to pubkey",
"flDisable": "Disable frontlight"
},
"control": {
"systemInfo": "System info",

View file

@ -36,7 +36,8 @@
"mempoolInstanceHelpText": "Solo es efectivo cuando la fuente de datos BTClock está deshabilitada. \nEs necesario reiniciar para aplicar.",
"luxLightToggle": "Cambio automático de luz frontal en lux",
"wpTimeout": "Portal de configuración WiFi timeout",
"useNostr": "Utilice la fuente de datos Nostr"
"useNostr": "Utilice la fuente de datos Nostr",
"flDisable": "Desactivar luz de la pantalla"
},
"control": {
"turnOff": "Apagar",

View file

@ -37,7 +37,8 @@
"mempoolInstanceHelpText": "Alleen effectief als de BTClock-gegevensbron is uitgeschakeld. \nOm toe te passen is een herstart nodig.",
"luxLightToggle": "Schakelen displaylicht op lux",
"wpTimeout": "WiFi-config-portal timeout",
"useNostr": "Gebruik Nostr-gegevensbron"
"useNostr": "Gebruik Nostr-gegevensbron",
"flDisable": "Schakel Displaylicht uit"
},
"control": {
"systemInfo": "Systeeminformatie",

View file

@ -187,7 +187,7 @@
</Form>
<hr />
{/if}
{#if $settings.hasFrontlight}
{#if $settings.hasFrontlight && !$settings.flDisable}
<h3>{$_('section.control.frontlight')}</h3>
<Row class="d-flex justify-content-between justify-content-md-end">
<Col md="auto" class="">

View file

@ -286,7 +286,7 @@
/>
</Col>
</Row>
{#if $settings.hasFrontlight}
{#if $settings.hasFrontlight && !$settings.flDisable}
<Row>
<Label md={6} for="flMaxBrightness" size={$uiSettings.inputSize}
>{$_('section.settings.flMaxBrightness')}</Label
@ -548,33 +548,7 @@
label={$_('section.settings.useBigCharsMcap')}
/>
</Col>
<Col md="6" xl="12" xxl="6">
<Input
id="otaEnabled"
bind:checked={$settings.otaEnabled}
type="switch"
bsSize={$uiSettings.inputSize}
label="{$_('section.settings.otaUpdates')} ({$_('restartRequired')})"
/>
</Col>
<Col md="6" xl="12" xxl="6">
<Input
id="mdnsEnabled"
bind:checked={$settings.mdnsEnabled}
type="switch"
bsSize={$uiSettings.inputSize}
label="{$_('section.settings.enableMdns')} ({$_('restartRequired')})"
/>
</Col>
<Col md="6" xl="12" xxl="6">
<Input
id="fetchEurPrice"
bind:checked={$settings.fetchEurPrice}
type="switch"
bsSize={$uiSettings.inputSize}
label="{$_('section.settings.fetchEuroPrice')} ({$_('restartRequired')})"
/>
</Col>
<Col md="6" xl="12" xxl="6">
<Input
id="useBlkCountdown"
@ -611,6 +585,46 @@
label={$_('section.settings.disableLeds')}
/>
</Col>
{#if $settings.hasFrontlight}
<Col md="6" xl="12" xxl="6">
<Input
id="flDisable"
bind:checked={$settings.flDisable}
type="switch"
bsSize={$uiSettings.inputSize}
label={$_('section.settings.flDisable')}
/>
</Col>
{/if}
{#if $settings.hasFrontlight && !$settings.flDisable}
<Col md="6" xl="12" xxl="6">
<Input
id="flAlwaysOn"
bind:checked={$settings.flAlwaysOn}
type="switch"
bsSize={$uiSettings.inputSize}
label={$_('section.settings.flAlwaysOn')}
/>
</Col>
<Col md="6" xl="12" xxl="6">
<Input
id="flFlashOnUpd"
bind:checked={$settings.flFlashOnUpd}
type="switch"
bsSize={$uiSettings.inputSize}
label={$_('section.settings.flFlashOnUpd')}
/>
</Col>
{/if}
<Col md="6" xl="12" xxl="6">
<Input
id="fetchEurPrice"
bind:checked={$settings.fetchEurPrice}
type="switch"
bsSize={$uiSettings.inputSize}
label="{$_('section.settings.fetchEuroPrice')} ({$_('restartRequired')})"
/>
</Col>
<Col md="6" xl="12" xxl="6">
<Input
id="ownDataSource"
@ -653,26 +667,24 @@
/>
</Col>
{/if}
{#if $settings.hasFrontlight}
<Col md="6" xl="12" xxl="6">
<Input
id="flAlwaysOn"
bind:checked={$settings.flAlwaysOn}
type="switch"
bsSize={$uiSettings.inputSize}
label={$_('section.settings.flAlwaysOn')}
/>
</Col>
<Col md="6" xl="12" xxl="6">
<Input
id="flFlashOnUpd"
bind:checked={$settings.flFlashOnUpd}
type="switch"
bsSize={$uiSettings.inputSize}
label={$_('section.settings.flFlashOnUpd')}
/>
</Col>
{/if}
<Col md="6" xl="12" xxl="6">
<Input
id="otaEnabled"
bind:checked={$settings.otaEnabled}
type="switch"
bsSize={$uiSettings.inputSize}
label="{$_('section.settings.otaUpdates')} ({$_('restartRequired')})"
/>
</Col>
<Col md="6" xl="12" xxl="6">
<Input
id="mdnsEnabled"
bind:checked={$settings.mdnsEnabled}
type="switch"
bsSize={$uiSettings.inputSize}
label="{$_('section.settings.enableMdns')} ({$_('restartRequired')})"
/>
</Col>
</Row>
<Row>