Add BitAxe support

This commit is contained in:
Djuri 2024-07-29 20:10:26 +02:00
parent e7b52b7367
commit be5647e1a5
8 changed files with 65 additions and 3 deletions

View file

@ -1,5 +1,7 @@
<script lang="ts">
export let status = {};
import RocketIcon from '../icons/RocketIcon.svelte';
import PickaxeIcon from '../icons/PickaxeIcon.svelte';
const isSplitText = (str: string) => {
return str.includes('/');
@ -15,8 +17,17 @@
<div class="flex-items">{part}</div>
{/each}
</div>
{:else if char.startsWith('mdi')}
<div class="digit icon">
{#if char.endsWith('rocket')}
<RocketIcon></RocketIcon>
{/if}
{#if char.endsWith('pickaxe')}
<PickaxeIcon></PickaxeIcon>
{/if}
</div>
{:else if char === 'STS'}
<div class="digit sats">S</div>
<div class="digit sats"></div>
{:else if char.length >= 3}
<div class="mediumText">{char}</div>
{:else if char.length === 0 || char === ' '}
@ -27,3 +38,9 @@
{/each}
</div>
</div>
<style>
.icon {
fill: currentColor;
}
</style>

View file

@ -283,6 +283,22 @@
</Col>
</Row>
{/if}
{#if $settings.bitaxeEnabled}
<Row>
<Label md={6} for="bitaxeHostname" size={$uiSettings.inputSize}
>{$_('section.settings.bitaxeHostname')}</Label
>
<Col md="6">
<Input
type="text"
bind:value={$settings.bitaxeHostname}
name="bitaxeHostname"
id="bitaxeHostname"
bsSize={$uiSettings.inputSize}
></Input>
</Col>
</Row>
{/if}
{#if $settings.useNostr}
<Row>
<Label md={6} for="nostrPubKey" size={$uiSettings.inputSize}
@ -520,6 +536,17 @@
/>
</Col>
{/if}
{#if 'bitaxeEnabled' in $settings}
<Col md="6">
<Input
id="bitaxeEnabled"
bind:checked={$settings.bitaxeEnabled}
type="switch"
bsSize={$uiSettings.inputSize}
label="{$_('section.settings.bitaxeEnabled')} ({$_('restartRequired')})"
/>
</Col>
{/if}
{#if $settings.hasFrontlight}
<Col md="6">
<Input