Add Nowstore

This commit is contained in:
2024-08-19 11:19:07 +02:00
parent 69eee93cff
commit 5b00b68a88
2 changed files with 47 additions and 8 deletions

View File

@@ -3,18 +3,33 @@
import Header from "$lib/components/Header.svelte";
import Router from "$lib/router/Router.svelte";
import { billsStore } from "$lib/store/billsStore";
import { Close } from '$wails/main/App'
import { Close } from "$wails/main/App";
import { nowStore } from "$lib/store/nowStore";
console.log($billsStore);
console.log($billsStore);
console.log($nowStore);
function keyDown(event: KeyboardEvent) {
if (event.ctrlKey && event.key == "r") {
window.location.reload();
setTimeout(nowStore.next, 1000);
setTimeout(nowStore.next, 2000);
setTimeout(nowStore.next, 3000);
setTimeout(nowStore.next, 4000);
setTimeout(nowStore.next, 5000);
setTimeout(nowStore.next, 6000);
setTimeout(nowStore.next, 7000);
setTimeout(nowStore.next, 8000);
$: {
console.log($nowStore);
}
if (event.ctrlKey && event.key == "w") {
Close();
function keyDown(event: KeyboardEvent) {
if (event.ctrlKey && event.key == "r") {
window.location.reload();
}
if (event.ctrlKey && event.key == "w") {
Close();
}
}
}
</script>
<svelte:window on:keydown={keyDown} />