forked from btclock/webui
Compare commits
39 commits
52ab8df77a
...
b6565ef853
Author | SHA1 | Date | |
---|---|---|---|
b6565ef853 | |||
d49805fe45 | |||
|
653a39d0a3 | ||
|
68c247f3cc | ||
|
25e91b2086 | ||
|
f0fa58b5ea | ||
|
b8ed628bf5 | ||
|
00af5f6521 | ||
|
51cce2ee9f | ||
|
de99a221d6 | ||
|
93482b3be2 | ||
|
d74e9dab60 | ||
|
da3c70285d | ||
|
5066032a55 | ||
|
5346938159 | ||
|
c8e68faf69 | ||
|
eeeb0ee62c | ||
|
384b4317c4 | ||
|
9867988a09 | ||
|
6f0e343429 | ||
|
95aa9d67d1 | ||
|
7d82b1e1a9 | ||
|
761c7f2991 | ||
|
1447917955 | ||
|
6c40b54273 | ||
|
1c2d8dcdd0 | ||
|
1fa62ca88d | ||
|
2fffb3ef02 | ||
|
3d69570099 | ||
|
3342e6a532 | ||
|
97519a1ae7 | ||
|
0843fae200 | ||
|
87b53165bf | ||
|
53a242582c | ||
|
b5d384023b | ||
|
af81b14b86 | ||
|
80d1211f91 | ||
|
eafe9d6341 | ||
|
1d5efa42e8 |
10 changed files with 17 additions and 65 deletions
|
@ -57,8 +57,7 @@
|
||||||
"showAll": "Alle anzeigen",
|
"showAll": "Alle anzeigen",
|
||||||
"hideAll": "Alles ausblenden",
|
"hideAll": "Alles ausblenden",
|
||||||
"flOffWhenDark": "Displaybeleuchtung aus, wenn es dunkel ist",
|
"flOffWhenDark": "Displaybeleuchtung aus, wenn es dunkel ist",
|
||||||
"luxLightToggleText": "Zum Deaktivieren auf 0 setzen",
|
"luxLightToggleText": "Zum Deaktivieren auf 0 setzen"
|
||||||
"verticalDesc": "Vrtikale Bildschirmbeschreibung"
|
|
||||||
},
|
},
|
||||||
"control": {
|
"control": {
|
||||||
"systemInfo": "Systeminfo",
|
"systemInfo": "Systeminfo",
|
||||||
|
|
|
@ -71,8 +71,7 @@
|
||||||
"showAll": "Show all",
|
"showAll": "Show all",
|
||||||
"hideAll": "Hide all",
|
"hideAll": "Hide all",
|
||||||
"flOffWhenDark": "Frontlight off when dark",
|
"flOffWhenDark": "Frontlight off when dark",
|
||||||
"luxLightToggleText": "Set to 0 to disable",
|
"luxLightToggleText": "Set to 0 to disable"
|
||||||
"verticalDesc": "Use vertical screen description"
|
|
||||||
},
|
},
|
||||||
"control": {
|
"control": {
|
||||||
"systemInfo": "System info",
|
"systemInfo": "System info",
|
||||||
|
|
|
@ -56,8 +56,7 @@
|
||||||
"showAll": "Mostrar todo",
|
"showAll": "Mostrar todo",
|
||||||
"hideAll": "Ocultar todo",
|
"hideAll": "Ocultar todo",
|
||||||
"flOffWhenDark": "Luz de la pantalla cuando está oscuro",
|
"flOffWhenDark": "Luz de la pantalla cuando está oscuro",
|
||||||
"luxLightToggleText": "Establecer en 0 para desactivar",
|
"luxLightToggleText": "Establecer en 0 para desactivar"
|
||||||
"verticalDesc": "Descripción de pantalla vertical"
|
|
||||||
},
|
},
|
||||||
"control": {
|
"control": {
|
||||||
"turnOff": "Apagar",
|
"turnOff": "Apagar",
|
||||||
|
|
|
@ -57,8 +57,7 @@
|
||||||
"showAll": "Toon alles",
|
"showAll": "Toon alles",
|
||||||
"hideAll": "Alles verbergen",
|
"hideAll": "Alles verbergen",
|
||||||
"flOffWhenDark": "Displaylicht uit als het donker is",
|
"flOffWhenDark": "Displaylicht uit als het donker is",
|
||||||
"luxLightToggleText": "Stel in op 0 om uit te schakelen",
|
"luxLightToggleText": "Stel in op 0 om uit te schakelen"
|
||||||
"verticalDesc": "Verticale schermbeschrijving"
|
|
||||||
},
|
},
|
||||||
"control": {
|
"control": {
|
||||||
"systemInfo": "Systeeminformatie",
|
"systemInfo": "Systeeminformatie",
|
||||||
|
|
|
@ -158,18 +158,12 @@ nav {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.verticalDesc > .splitText:first-child {
|
.splitText div:first-child::after {
|
||||||
.textcontainer {
|
|
||||||
transform: rotate(-90deg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.splitText .textcontainer :first-child::after {
|
|
||||||
display: block;
|
display: block;
|
||||||
content: '';
|
content: '';
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
border-bottom: 2px solid;
|
border-bottom: 2px solid;
|
||||||
// margin-bottom: 3px;
|
margin-bottom: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.splitText {
|
.splitText {
|
||||||
|
@ -299,7 +293,3 @@ nav {
|
||||||
input[type='number'] {
|
input[type='number'] {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lightMode .bitaxelogo {
|
|
||||||
filter: brightness(0) saturate(100%);
|
|
||||||
}
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
export let className = 'btclock-wrapper';
|
export let className = 'btclock-wrapper';
|
||||||
export let verticalDesc = false;
|
|
||||||
// Define the currency symbols as constants
|
// Define the currency symbols as constants
|
||||||
const CURRENCY_USD = '$';
|
const CURRENCY_USD = '$';
|
||||||
const CURRENCY_EUR = '[';
|
const CURRENCY_EUR = '[';
|
||||||
|
@ -44,22 +44,21 @@
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class={className} id={className}>
|
<div class={className} id={className}>
|
||||||
<div class={'btclock' + (verticalDesc ? ' verticalDesc' : '')}>
|
<div class="btclock">
|
||||||
{#each status.data as char}
|
{#each status.data as char}
|
||||||
{#if isSplitText(char)}
|
{#if isSplitText(char)}
|
||||||
<div class="splitText">
|
<div class="splitText">
|
||||||
<div class="textcontainer">
|
{#if char.split('/').length}
|
||||||
{#if char.split('/').length}
|
<span class="top-text">{char.split('/')[0]}</span>
|
||||||
<span class="top-text">{char.split('/')[0]}</span>
|
<hr />
|
||||||
<span class="bottom-text">{char.split('/')[1]}</span>
|
<span class="bottom-text">{char.split('/')[1]}</span>
|
||||||
{/if}
|
{/if}
|
||||||
</div>
|
|
||||||
<!-- {#each char.split('/') as part}
|
<!-- {#each char.split('/') as part}
|
||||||
<div class="flex-items">{part}</div>
|
<div class="flex-items">{part}</div>
|
||||||
{/each} -->
|
{/each} -->
|
||||||
</div>
|
</div>
|
||||||
{:else if char.startsWith('mdi')}
|
{:else if char.startsWith('mdi')}
|
||||||
<div class={'digit icon' + (char.endsWith('bitaxe') ? ' icon-img' : '')}>
|
<div class="digit icon">
|
||||||
{#if char.endsWith('rocket')}
|
{#if char.endsWith('rocket')}
|
||||||
<RocketIcon></RocketIcon>
|
<RocketIcon></RocketIcon>
|
||||||
{/if}
|
{/if}
|
||||||
|
@ -69,9 +68,6 @@
|
||||||
{#if char.endsWith('bolt')}
|
{#if char.endsWith('bolt')}
|
||||||
<ZapIcon></ZapIcon>
|
<ZapIcon></ZapIcon>
|
||||||
{/if}
|
{/if}
|
||||||
{#if char.endsWith('bitaxe')}
|
|
||||||
<img src="/bitaxe.webp" class="bitaxelogo" alt="BitAxe logo" />
|
|
||||||
{/if}
|
|
||||||
</div>
|
</div>
|
||||||
{:else if char === 'STS'}
|
{:else if char === 'STS'}
|
||||||
<div class="digit sats">S</div>
|
<div class="digit sats">S</div>
|
||||||
|
@ -86,22 +82,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<style lang="scss">
|
<style>
|
||||||
.icon {
|
.icon {
|
||||||
fill: currentColor;
|
fill: currentColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btclock-wrapper .btclock .icon.icon-img {
|
|
||||||
// padding: 0 15px;
|
|
||||||
aspect-ratio: 1;
|
|
||||||
width: calc(100 / 7);
|
|
||||||
|
|
||||||
img {
|
|
||||||
max-width: 95%;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.bitaxelogo {
|
|
||||||
transform: rotate(-90deg);
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -318,15 +318,6 @@
|
||||||
label={$_('section.settings.suffixShareDot')}
|
label={$_('section.settings.suffixShareDot')}
|
||||||
/>
|
/>
|
||||||
</Col>
|
</Col>
|
||||||
<Col md="6" xl="12" xxl="6">
|
|
||||||
<Input
|
|
||||||
id="verticalDesc"
|
|
||||||
bind:checked={$settings.verticalDesc}
|
|
||||||
type="switch"
|
|
||||||
bsSize={$uiSettings.inputSize}
|
|
||||||
label={$_('section.settings.verticalDesc')}
|
|
||||||
/>
|
|
||||||
</Col>
|
|
||||||
|
|
||||||
{#if !$settings.actCurrencies}
|
{#if !$settings.actCurrencies}
|
||||||
<Col md="6" xl="12" xxl="6">
|
<Col md="6" xl="12" xxl="6">
|
||||||
|
|
|
@ -151,11 +151,7 @@
|
||||||
<hr />
|
<hr />
|
||||||
{#if $status.data}
|
{#if $status.data}
|
||||||
<section class={lightMode ? 'lightMode' : 'darkMode'}>
|
<section class={lightMode ? 'lightMode' : 'darkMode'}>
|
||||||
<Rendered
|
<Rendered status={$status} className="btclock-wrapper"></Rendered>
|
||||||
status={$status}
|
|
||||||
className="btclock-wrapper"
|
|
||||||
verticalDesc={$settings.verticalDesc}
|
|
||||||
></Rendered>
|
|
||||||
</section>
|
</section>
|
||||||
{$_('section.status.screenCycle')}:
|
{$_('section.status.screenCycle')}:
|
||||||
<a
|
<a
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 2.4 KiB |
|
@ -1,6 +1,6 @@
|
||||||
import { test, expect } from '@playwright/test';
|
import { test, expect } from '@playwright/test';
|
||||||
|
|
||||||
import { initMock, settingsJson, statusJson } from '../shared';
|
import { initMock, settingsJson } from '../shared';
|
||||||
|
|
||||||
test.beforeEach(initMock);
|
test.beforeEach(initMock);
|
||||||
|
|
||||||
|
@ -69,9 +69,6 @@ test('capture screenshots across devices with bitaxe screens', async ({ page },
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
statusJson.data = ['mdi:bitaxe', '', 'mdi:pickaxe', '6', '3', '7', 'GH/S'];
|
|
||||||
statusJson.rendered = ['mdi:bitaxe', '', 'mdi:pickaxe', '6', '3', '7', 'GH/S'];
|
|
||||||
|
|
||||||
await page.goto('/');
|
await page.goto('/');
|
||||||
await expect(page.getByRole('heading', { name: 'Control' })).toBeVisible();
|
await expect(page.getByRole('heading', { name: 'Control' })).toBeVisible();
|
||||||
await expect(page.getByRole('heading', { name: 'Status' })).toBeVisible();
|
await expect(page.getByRole('heading', { name: 'Status' })).toBeVisible();
|
||||||
|
|
Loading…
Reference in a new issue