Add bitaxe icon and modify tests for it
Some checks failed
/ check-changes (push) Successful in 5s
/ build (push) Failing after 53s

This commit is contained in:
Djuri Baars 2024-12-18 01:24:21 +01:00
parent 266a99be96
commit eff18ba0c3
4 changed files with 27 additions and 3 deletions

View file

@ -299,3 +299,7 @@ nav {
input[type='number'] {
text-align: right;
}
.lightMode .bitaxelogo {
filter: brightness(0) saturate(100%);
}

View file

@ -59,7 +59,7 @@
{/each} -->
</div>
{:else if char.startsWith('mdi')}
<div class="digit icon">
<div class={'digit icon' + (char.endsWith('bitaxe') ? ' icon-img' : '')}>
{#if char.endsWith('rocket')}
<RocketIcon></RocketIcon>
{/if}
@ -69,6 +69,9 @@
{#if char.endsWith('bolt')}
<ZapIcon></ZapIcon>
{/if}
{#if char.endsWith('bitaxe')}
<img src="/bitaxe.webp" class="bitaxelogo" />
{/if}
</div>
{:else if char === 'STS'}
<div class="digit sats">S</div>
@ -83,8 +86,22 @@
</div>
</div>
<style>
<style lang="scss">
.icon {
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>

BIN
static/bitaxe.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

View file

@ -1,6 +1,6 @@
import { test, expect } from '@playwright/test';
import { initMock, settingsJson } from '../shared';
import { initMock, settingsJson, statusJson } from '../shared';
test.beforeEach(initMock);
@ -69,6 +69,9 @@ 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 expect(page.getByRole('heading', { name: 'Control' })).toBeVisible();
await expect(page.getByRole('heading', { name: 'Status' })).toBeVisible();