Add BitAxe support
This commit is contained in:
parent
e7b52b7367
commit
be5647e1a5
8 changed files with 65 additions and 3 deletions
5
src/icons/PickaxeIcon.svelte
Normal file
5
src/icons/PickaxeIcon.svelte
Normal file
|
@ -0,0 +1,5 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
|
||||
><path
|
||||
d="M14.79,10.62L3.5,21.9L2.1,20.5L13.38,9.21L14.79,10.62M19.27,7.73L19.86,7.14L19.07,6.35L19.71,5.71L18.29,4.29L17.65,4.93L16.86,4.14L16.27,4.73C14.53,3.31 12.57,2.17 10.47,1.37L9.64,3.16C11.39,4.08 13,5.19 14.5,6.5L14,7L17,10L17.5,9.5C18.81,11 19.92,12.61 20.84,14.36L22.63,13.53C21.83,11.43 20.69,9.47 19.27,7.73Z"
|
||||
/></svg
|
||||
>
|
After Width: | Height: | Size: 398 B |
8
src/icons/RocketIcon.svelte
Normal file
8
src/icons/RocketIcon.svelte
Normal file
|
@ -0,0 +1,8 @@
|
|||
<script lang="ts">
|
||||
</script>
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"
|
||||
><title>rocket-launch</title><path
|
||||
d="M13.13 22.19L11.5 18.36C13.07 17.78 14.54 17 15.9 16.09L13.13 22.19M5.64 12.5L1.81 10.87L7.91 8.1C7 9.46 6.22 10.93 5.64 12.5M21.61 2.39C21.61 2.39 16.66 .269 11 5.93C8.81 8.12 7.5 10.53 6.65 12.64C6.37 13.39 6.56 14.21 7.11 14.77L9.24 16.89C9.79 17.45 10.61 17.63 11.36 17.35C13.5 16.53 15.88 15.19 18.07 13C23.73 7.34 21.61 2.39 21.61 2.39M14.54 9.46C13.76 8.68 13.76 7.41 14.54 6.63S16.59 5.85 17.37 6.63C18.14 7.41 18.15 8.68 17.37 9.46C16.59 10.24 15.32 10.24 14.54 9.46M8.88 16.53L7.47 15.12L8.88 16.53M6.24 22L9.88 18.36C9.54 18.27 9.21 18.12 8.91 17.91L4.83 22H6.24M2 22H3.41L8.18 17.24L6.76 15.83L2 20.59V22M2 19.17L6.09 15.09C5.88 14.79 5.73 14.47 5.64 14.12L2 17.76V19.17Z"
|
||||
/></svg
|
||||
>
|
|
@ -39,7 +39,9 @@
|
|||
"wpTimeout": "WiFi-config portal timeout",
|
||||
"nostrPubKey": "Nostr source pubkey",
|
||||
"nostrRelay": "Nostr Relay",
|
||||
"useNostr": "Use Nostr datasource"
|
||||
"useNostr": "Use Nostr datasource",
|
||||
"bitaxeHostname": "BitAxe hostname",
|
||||
"bitaxeEnabled": "Enable BitAxe"
|
||||
},
|
||||
"control": {
|
||||
"systemInfo": "System info",
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue