forked from btclock/webui
Add German translation, add own price source selection
This commit is contained in:
parent
dcdf98964a
commit
e47fc066b0
9 changed files with 167 additions and 8 deletions
|
@ -24,7 +24,8 @@
|
|||
const flagMap: { [key: string]: string } = {
|
||||
en: '🇬🇧', // English flag emoji
|
||||
nl: '🇳🇱', // Dutch flag emoji
|
||||
es: '🇪🇸' // Spanish flag emoji
|
||||
es: '🇪🇸', // Spanish flag emoji
|
||||
de: '🇩🇪' // German flag emoji
|
||||
};
|
||||
|
||||
// Convert the language code to lowercase for case-insensitive matching
|
||||
|
|
|
@ -75,7 +75,7 @@
|
|||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>₿TClock</title>
|
||||
<title>BTClock</title>
|
||||
</svelte:head>
|
||||
|
||||
<Container fluid>
|
||||
|
|
|
@ -55,6 +55,14 @@
|
|||
fetch(`${PUBLIC_BASE_URL}/api/lights/off`).catch(() => {});
|
||||
};
|
||||
|
||||
const turnOnFrontlight = () => {
|
||||
fetch(`${PUBLIC_BASE_URL}/api/frontlight/on`).catch(() => {});
|
||||
};
|
||||
|
||||
const turnOffFrontlight = () => {
|
||||
fetch(`${PUBLIC_BASE_URL}/api/frontlight/off`).catch(() => {});
|
||||
};
|
||||
|
||||
const restartClock = () => {
|
||||
fetch(`${PUBLIC_BASE_URL}/api/restart`).catch(() => {});
|
||||
};
|
||||
|
@ -146,6 +154,14 @@
|
|||
</Form>
|
||||
<hr />
|
||||
{/if}
|
||||
{#if $settings.hasFrontlight}
|
||||
<h3>{$_('section.control.frontlight')}</h3>
|
||||
<Button color="secondary" id="turnOffFrontlightBtn" on:click={turnOffFrontlight}
|
||||
>{$_('section.control.turnOff')}</Button
|
||||
>
|
||||
<Button color="primary" on:click={turnOnFrontlight}>{$_('section.control.turnOn')}</Button>
|
||||
<hr />
|
||||
{/if}
|
||||
<h3>{$_('section.control.systemInfo')}</h3>
|
||||
<ul class="small system_info">
|
||||
<li>{$_('section.control.version')}: {$settings.gitRev}</li>
|
||||
|
|
|
@ -193,6 +193,24 @@
|
|||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
{#if $settings.hasFrontlight}
|
||||
<Row>
|
||||
<Label md={6} for="flMaxBrightness" size="sm"
|
||||
>{$_('section.settings.flMaxBrightness')}</Label
|
||||
>
|
||||
<Col md="6">
|
||||
<Input
|
||||
type="range"
|
||||
name="flMaxBrightness"
|
||||
id="flMaxBrightness"
|
||||
bind:value={$settings.flMaxBrightness}
|
||||
min={0}
|
||||
max={4095}
|
||||
step={1}
|
||||
/>
|
||||
</Col>
|
||||
</Row>
|
||||
{/if}
|
||||
<Row>
|
||||
<Label md={6} for="mempoolInstance" size="sm"
|
||||
>{$_('section.settings.mempoolnstance')}</Label
|
||||
|
@ -341,6 +359,26 @@
|
|||
label={$_('section.settings.disableLeds')}
|
||||
/>
|
||||
</Col>
|
||||
<Col md="6">
|
||||
<Input
|
||||
id="ownPriceSource"
|
||||
bind:checked={$settings.ownPriceSource}
|
||||
type="switch"
|
||||
bsSize="sm"
|
||||
label="{$_('section.settings.ownPriceSource')} ({$_('restartRequired')})"
|
||||
/>
|
||||
</Col>
|
||||
{#if $settings.hasFrontlight}
|
||||
<Col md="6">
|
||||
<Input
|
||||
id="flAlwaysOn"
|
||||
bind:checked={$settings.flAlwaysOn}
|
||||
type="switch"
|
||||
bsSize="sm"
|
||||
label={$_('section.settings.flAlwaysOn')}
|
||||
/>
|
||||
</Col>
|
||||
{/if}
|
||||
</Row>
|
||||
|
||||
<Row>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue