2023-11-17 00:05:35 +00:00
|
|
|
<script lang="ts">
|
2023-11-19 19:27:22 +00:00
|
|
|
export let status = {};
|
2023-11-17 00:05:35 +00:00
|
|
|
|
2023-11-19 19:27:22 +00:00
|
|
|
const isSplitText = (str: string) => {
|
|
|
|
return str.includes('/');
|
|
|
|
};
|
2023-11-17 00:05:35 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<div class="btcclock-wrapper" id="btcclock-wrapper">
|
2023-11-19 19:27:22 +00:00
|
|
|
<div class="btclock">
|
|
|
|
{#each status.data as char}
|
|
|
|
{#if isSplitText(char)}
|
|
|
|
<div class="splitText">
|
|
|
|
{#each char.split('/') as part}
|
|
|
|
<div class="flex-items">{part}</div>
|
|
|
|
{/each}
|
|
|
|
</div>
|
|
|
|
{:else if char.length === 0 || char === ' '}
|
|
|
|
<div class="digit"> </div>
|
|
|
|
{:else}
|
|
|
|
<div class="digit">{char}</div>
|
|
|
|
{/if}
|
|
|
|
{/each}
|
|
|
|
</div>
|
|
|
|
</div>
|