mirror of
https://github.com/CharaChorder/DeviceManager.git
synced 2026-02-18 23:22:40 +00:00
feat: better update page
feat: hide manual update steps as "unsafe" if OTA is available resolves #155
This commit is contained in:
20
src/routes/(app)/test/+page.svelte
Normal file
20
src/routes/(app)/test/+page.svelte
Normal file
@@ -0,0 +1,20 @@
|
||||
<script lang="ts">
|
||||
import AnimatedNumber from "$lib/components/AnimatedNumber.svelte";
|
||||
import { onDestroy, onMount } from "svelte";
|
||||
|
||||
let interval: ReturnType<typeof setInterval>;
|
||||
|
||||
let value = $state(Math.round(Math.random() * 100));
|
||||
|
||||
onMount(() => {
|
||||
interval = setInterval(() => {
|
||||
value = Math.round(Math.random() * 100);
|
||||
}, 2000);
|
||||
});
|
||||
|
||||
onDestroy(() => {
|
||||
clearInterval(interval);
|
||||
});
|
||||
</script>
|
||||
|
||||
<p>The number is <AnimatedNumber {value} /></p>
|
||||
Reference in New Issue
Block a user