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

View file

@ -46,7 +46,8 @@
"bitaxeEnabled": "Enable BitAxe", "bitaxeEnabled": "Enable BitAxe",
"nostrZapPubkey": "Nostr Zap pubkey", "nostrZapPubkey": "Nostr Zap pubkey",
"invalidNostrPubkey": "Invalid Nostr pubkey, note that your pubkey does NOT start with npub.", "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": { "control": {
"systemInfo": "System info", "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.", "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", "luxLightToggle": "Cambio automático de luz frontal en lux",
"wpTimeout": "Portal de configuración WiFi timeout", "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": { "control": {
"turnOff": "Apagar", "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.", "mempoolInstanceHelpText": "Alleen effectief als de BTClock-gegevensbron is uitgeschakeld. \nOm toe te passen is een herstart nodig.",
"luxLightToggle": "Schakelen displaylicht op lux", "luxLightToggle": "Schakelen displaylicht op lux",
"wpTimeout": "WiFi-config-portal timeout", "wpTimeout": "WiFi-config-portal timeout",
"useNostr": "Gebruik Nostr-gegevensbron" "useNostr": "Gebruik Nostr-gegevensbron",
"flDisable": "Schakel Displaylicht uit"
}, },
"control": { "control": {
"systemInfo": "Systeeminformatie", "systemInfo": "Systeeminformatie",

View file

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

View file

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