forked from btclock/webui
Dependency updates and frontlight settings
This commit is contained in:
parent
6ecb482600
commit
e859adac86
8 changed files with 922 additions and 668 deletions
|
@ -31,7 +31,9 @@
|
||||||
"settingsSaved": "Einstellungen gespeichert",
|
"settingsSaved": "Einstellungen gespeichert",
|
||||||
"errorSavingSettings": "Fehler beim Speichern der Einstellungen",
|
"errorSavingSettings": "Fehler beim Speichern der Einstellungen",
|
||||||
"ownDataSource": "BTClock-Datenquelle verwenden",
|
"ownDataSource": "BTClock-Datenquelle verwenden",
|
||||||
"flAlwaysOn": "Displaybeleuchtung immer an"
|
"flAlwaysOn": "Displaybeleuchtung immer an",
|
||||||
|
"flEffectDelay": "Displaybeleuchtungeffekt Geschwindigkeit",
|
||||||
|
"flFlashOnUpd": "Displaybeleuchting bei neuem Block"
|
||||||
},
|
},
|
||||||
"control": {
|
"control": {
|
||||||
"systemInfo": "Systeminfo",
|
"systemInfo": "Systeminfo",
|
||||||
|
@ -45,7 +47,8 @@
|
||||||
"title": "Kontrolle",
|
"title": "Kontrolle",
|
||||||
"hostname": "Hostname",
|
"hostname": "Hostname",
|
||||||
"frontlight": "Displaybeleuchtung",
|
"frontlight": "Displaybeleuchtung",
|
||||||
"turnOn": "Einschalten"
|
"turnOn": "Einschalten",
|
||||||
|
"flashFrontlight": "Blinken"
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"title": "Status",
|
"title": "Status",
|
||||||
|
|
|
@ -31,7 +31,9 @@
|
||||||
"errorSavingSettings": "Error saving settings",
|
"errorSavingSettings": "Error saving settings",
|
||||||
"ownDataSource": "Use BTClock data source",
|
"ownDataSource": "Use BTClock data source",
|
||||||
"flMaxBrightness": "Frontlight brightness",
|
"flMaxBrightness": "Frontlight brightness",
|
||||||
"flAlwaysOn": "Frontlight always on"
|
"flAlwaysOn": "Frontlight always on",
|
||||||
|
"flEffectDelay": "Frontlight effect speed",
|
||||||
|
"flFlashOnUpd": "Frontlight flash on new block"
|
||||||
},
|
},
|
||||||
"control": {
|
"control": {
|
||||||
"systemInfo": "System info",
|
"systemInfo": "System info",
|
||||||
|
@ -45,7 +47,8 @@
|
||||||
"title": "Control",
|
"title": "Control",
|
||||||
"hostname": "Hostname",
|
"hostname": "Hostname",
|
||||||
"frontlight": "Frontlight",
|
"frontlight": "Frontlight",
|
||||||
"turnOn": "Turn on"
|
"turnOn": "Turn on",
|
||||||
|
"flashFrontlight": "Flash"
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"title": "Status",
|
"title": "Status",
|
||||||
|
|
|
@ -30,7 +30,9 @@
|
||||||
"errorSavingSettings": "Error al guardar la configuración",
|
"errorSavingSettings": "Error al guardar la configuración",
|
||||||
"ownDataSource": "Utilice la fuente de datos BTClock",
|
"ownDataSource": "Utilice la fuente de datos BTClock",
|
||||||
"flMaxBrightness": "Brillo de luz de la pantalla",
|
"flMaxBrightness": "Brillo de luz de la pantalla",
|
||||||
"flAlwaysOn": "Luz de la pantalla siempre encendida"
|
"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"
|
||||||
},
|
},
|
||||||
"control": {
|
"control": {
|
||||||
"turnOff": "Apagar",
|
"turnOff": "Apagar",
|
||||||
|
@ -44,7 +46,8 @@
|
||||||
"buildTime": "Tiempo de compilación",
|
"buildTime": "Tiempo de compilación",
|
||||||
"hostname": "Nombre del host",
|
"hostname": "Nombre del host",
|
||||||
"turnOn": "Encender",
|
"turnOn": "Encender",
|
||||||
"frontlight": "Luz de la pantalla"
|
"frontlight": "Luz de la pantalla",
|
||||||
|
"flashFrontlight": "Luz intermitente"
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"memoryFree": "Memoria RAM libre",
|
"memoryFree": "Memoria RAM libre",
|
||||||
|
|
|
@ -31,7 +31,9 @@
|
||||||
"errorSavingSettings": "Fout bij opslaan instellingen",
|
"errorSavingSettings": "Fout bij opslaan instellingen",
|
||||||
"ownDataSource": "BTClock-gegevensbron gebruiken",
|
"ownDataSource": "BTClock-gegevensbron gebruiken",
|
||||||
"flMaxBrightness": "Displaylicht helderheid",
|
"flMaxBrightness": "Displaylicht helderheid",
|
||||||
"flAlwaysOn": "Displaylicht altijd aan"
|
"flAlwaysOn": "Displaylicht altijd aan",
|
||||||
|
"flEffectDelay": "Displaylicht effect snelheid",
|
||||||
|
"flFlashOnUpd": "Knipper displaylicht bij nieuw blok"
|
||||||
},
|
},
|
||||||
"control": {
|
"control": {
|
||||||
"systemInfo": "Systeeminformatie",
|
"systemInfo": "Systeeminformatie",
|
||||||
|
@ -44,7 +46,8 @@
|
||||||
"text": "Tekst",
|
"text": "Tekst",
|
||||||
"title": "Besturing",
|
"title": "Besturing",
|
||||||
"frontlight": "Displaylicht",
|
"frontlight": "Displaylicht",
|
||||||
"turnOn": "Aanzetten"
|
"turnOn": "Aanzetten",
|
||||||
|
"flashFrontlight": "Knipper"
|
||||||
},
|
},
|
||||||
"status": {
|
"status": {
|
||||||
"title": "Status",
|
"title": "Status",
|
||||||
|
|
|
@ -7,14 +7,9 @@
|
||||||
@import '@fontsource/oswald/latin-400.css';
|
@import '@fontsource/oswald/latin-400.css';
|
||||||
@import './satsymbol.scss';
|
@import './satsymbol.scss';
|
||||||
|
|
||||||
$form-range-track-bg: #fff;
|
|
||||||
$color-mode-type: media-query;
|
$color-mode-type: media-query;
|
||||||
$font-family-base: 'Ubuntu';
|
$font-family-base: 'Ubuntu';
|
||||||
$font-size-base: 0.9rem;
|
$font-size-base: 0.9rem;
|
||||||
//$font-size-sm: $font-size-base * .875 !default;
|
|
||||||
//$form-label-font-size: $font-size-base * .575 !default;
|
|
||||||
//$input-btn-font-size-sm: 0.4rem;
|
|
||||||
//$form-label-font-size: 0.4rem;
|
|
||||||
$input-font-size-sm: $font-size-base * 0.875;
|
$input-font-size-sm: $font-size-base * 0.875;
|
||||||
|
|
||||||
// $border-radius: .675rem;
|
// $border-radius: .675rem;
|
||||||
|
|
|
@ -59,6 +59,10 @@
|
||||||
fetch(`${PUBLIC_BASE_URL}/api/frontlight/on`).catch(() => {});
|
fetch(`${PUBLIC_BASE_URL}/api/frontlight/on`).catch(() => {});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const flashFrontlight = () => {
|
||||||
|
fetch(`${PUBLIC_BASE_URL}/api/frontlight/flash`).catch(() => {});
|
||||||
|
};
|
||||||
|
|
||||||
const turnOffFrontlight = () => {
|
const turnOffFrontlight = () => {
|
||||||
fetch(`${PUBLIC_BASE_URL}/api/frontlight/off`).catch(() => {});
|
fetch(`${PUBLIC_BASE_URL}/api/frontlight/off`).catch(() => {});
|
||||||
};
|
};
|
||||||
|
@ -160,6 +164,9 @@
|
||||||
>{$_('section.control.turnOff')}</Button
|
>{$_('section.control.turnOff')}</Button
|
||||||
>
|
>
|
||||||
<Button color="primary" on:click={turnOnFrontlight}>{$_('section.control.turnOn')}</Button>
|
<Button color="primary" on:click={turnOnFrontlight}>{$_('section.control.turnOn')}</Button>
|
||||||
|
<Button color="success" id="flashFrontlight" on:click={flashFrontlight}
|
||||||
|
>{$_('section.control.flashFrontlight')}</Button
|
||||||
|
>
|
||||||
<hr />
|
<hr />
|
||||||
{/if}
|
{/if}
|
||||||
<h3>{$_('section.control.systemInfo')}</h3>
|
<h3>{$_('section.control.systemInfo')}</h3>
|
||||||
|
|
|
@ -70,6 +70,15 @@
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const onFlBrightnessChange = async () => {
|
||||||
|
await fetch(`${PUBLIC_BASE_URL}/api/frontlight/brightness/${$settings.flMaxBrightness}`, {
|
||||||
|
method: 'GET',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/json'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Col>
|
<Col>
|
||||||
|
@ -204,12 +213,29 @@
|
||||||
name="flMaxBrightness"
|
name="flMaxBrightness"
|
||||||
id="flMaxBrightness"
|
id="flMaxBrightness"
|
||||||
bind:value={$settings.flMaxBrightness}
|
bind:value={$settings.flMaxBrightness}
|
||||||
|
on:change={onFlBrightnessChange}
|
||||||
min={0}
|
min={0}
|
||||||
max={4095}
|
max={4095}
|
||||||
step={1}
|
step={1}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
<Row>
|
||||||
|
<Label md={6} for="flEffectDelay" size="sm"
|
||||||
|
>{$_('section.settings.flEffectDelay')}</Label
|
||||||
|
>
|
||||||
|
<Col md="6">
|
||||||
|
<Input
|
||||||
|
type="range"
|
||||||
|
name="flEffectDelay"
|
||||||
|
id="flEffectDelay"
|
||||||
|
bind:value={$settings.flEffectDelay}
|
||||||
|
min={5}
|
||||||
|
max={300}
|
||||||
|
step={1}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
{/if}
|
{/if}
|
||||||
<Row>
|
<Row>
|
||||||
<Label md={6} for="hostnamePrefix" size="sm"
|
<Label md={6} for="hostnamePrefix" size="sm"
|
||||||
|
@ -364,6 +390,15 @@
|
||||||
label={$_('section.settings.flAlwaysOn')}
|
label={$_('section.settings.flAlwaysOn')}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
|
<Col md="6">
|
||||||
|
<Input
|
||||||
|
id="flFlashOnUpd"
|
||||||
|
bind:checked={$settings.flFlashOnUpd}
|
||||||
|
type="switch"
|
||||||
|
bsSize="sm"
|
||||||
|
label={$_('section.settings.flFlashOnUpd')}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
{/if}
|
{/if}
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue