Add light sensor settings

This commit is contained in:
Djuri Baars 2024-06-29 02:12:29 +02:00
parent 52e90dbdee
commit 59e2750cf3
6 changed files with 38 additions and 8 deletions

View file

@ -34,7 +34,8 @@
"flAlwaysOn": "Displaybeleuchtung immer an",
"flEffectDelay": "Displaybeleuchtungeffekt Geschwindigkeit",
"flFlashOnUpd": "Displaybeleuchting bei neuem Block",
"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"
},
"control": {
"systemInfo": "Systeminfo",
@ -60,7 +61,8 @@
"fetchEuroNote": "If you use \"Fetch € price\" the WS Price connection will show ❌ since it uses another data source.",
"uptime": "Betriebszeit",
"wifiSignalStrength": "WiFi-Signalstärke",
"wsDataConnection": "BTClock-Datenquelle verbindung"
"wsDataConnection": "BTClock-Datenquelle verbindung",
"lightSensor": "Lichtsensor"
},
"firmwareUpdater": {
"fileUploadSuccess": "Datei erfolgreich hochgeladen, Gerät neu gestartet. WebUI in {countdown} Sekunden neu geladen",

View file

@ -34,7 +34,8 @@
"flAlwaysOn": "Frontlight always on",
"flEffectDelay": "Frontlight effect speed",
"flFlashOnUpd": "Frontlight flash on new block",
"mempoolInstanceHelpText": "Only effective when BTClock data-source is disabled. A restart is required to apply."
"mempoolInstanceHelpText": "Only effective when BTClock data-source is disabled. A restart is required to apply.",
"luxLightToggle": "Auto toggle frontlight at lux"
},
"control": {
"systemInfo": "System info",
@ -62,7 +63,8 @@
"fetchEuroNote": "If you use \"Fetch € price\" the WS Price connection will show ❌ since it uses another data source.",
"uptime": "Uptime",
"wifiSignalStrength": "WiFi Signal strength",
"wsDataConnection": "BTClock data-source connection"
"wsDataConnection": "BTClock data-source connection",
"lightSensor": "Light sensor"
},
"firmwareUpdater": {
"fileUploadFailed": "File upload failed. Make sure you have selected the correct file and try again.",

View file

@ -33,7 +33,8 @@
"flAlwaysOn": "Luz de la pantalla siempre encendida",
"flEffectDelay": "Velocidad del efecto de luz de la pantalla",
"flFlashOnUpd": "Luz de la pantalla parpadea con un nuevo bloque",
"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"
},
"control": {
"turnOff": "Apagar",
@ -59,7 +60,8 @@
"fetchEuroNote": "Si utiliza \"Obtener precio en €\", la conexión de Precio WS mostrará ❌ ya que utiliza otra fuente de datos.",
"title": "Estado",
"wifiSignalStrength": "Fuerza de la señal WiFi",
"wsDataConnection": "Conexión de fuente de datos BTClock"
"wsDataConnection": "Conexión de fuente de datos BTClock",
"lightSensor": "Sensor de luz"
},
"firmwareUpdater": {
"fileUploadSuccess": "Archivo cargado exitosamente, reiniciando el dispositivo. Recargando WebUI en {countdown} segundos",

View file

@ -34,7 +34,8 @@
"flAlwaysOn": "Displaylicht altijd aan",
"flEffectDelay": "Displaylicht effect snelheid",
"flFlashOnUpd": "Knipper displaylicht bij nieuw blok",
"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"
},
"control": {
"systemInfo": "Systeeminformatie",
@ -59,7 +60,8 @@
"fetchEuroNote": "Wanneer je \"Toon € prijs\" aanzet, zal de prijsverbinding als ❌ verbroken getoond worden vanwege het gebruik van een andere bron.",
"uptime": "Uptime",
"wifiSignalStrength": "WiFi signaalsterkte",
"wsDataConnection": "BTClock-gegevensbron verbinding"
"wsDataConnection": "BTClock-gegevensbron verbinding",
"lightSensor": "Licht sensor"
},
"firmwareUpdater": {
"fileUploadSuccess": "Bestand geüpload, apparaat herstart. WebUI opnieuw geladen over {countdown} seconden",

View file

@ -255,6 +255,24 @@
</Col>
</Row>
{/if}
{#if $settings.hasLightLevel}
<Row>
<Label md={6} for="luxLightToggle" size={$uiSettings.inputSize}
>{$_('section.settings.luxLightToggle')} ({$settings.luxLightToggle})</Label
>
<Col md="6">
<Input
type="range"
name="luxLightToggle"
id="luxLightToggle"
bind:value={$settings.luxLightToggle}
min={0}
max={1000}
step={1}
/>
</Col>
</Row>
{/if}
<Row>
<Label md={6} for="mempoolInstance" size="sm"
>{$_('section.settings.mempoolnstance')}</Label

View file

@ -146,6 +146,10 @@
</div>
</div>
<hr />
{#if $settings.hasLightLevel}
{$_('section.status.lightSensor')}: {Number(Math.round($status.lightLevel))} lux
<hr />
{/if}
<Progress striped id="rssiBar" color={wifiStrengthColor} value={rssiPercent}
>{rssiPercent}%</Progress
>