generated from dave/wails-template
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
e83fb7abb8 | |||
3ca12139cd |
@@ -18,9 +18,16 @@
|
||||
scrollingTimeFrameStore.next();
|
||||
}
|
||||
}
|
||||
function scroll(event: WheelEvent) {
|
||||
if (event.deltaY < 0) {
|
||||
scrollingTimeFrameStore.next();
|
||||
} else {
|
||||
scrollingTimeFrameStore.prev();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<svelte:window on:keydown={keyDown} />
|
||||
<svelte:window on:keydown={keyDown} on:wheel={scroll} />
|
||||
<Toaster theme="dark" expand visibleToasts={9} />
|
||||
<template>
|
||||
<!-- <Header /> -->
|
||||
|
@@ -4,7 +4,8 @@ import { type Writable, writable } from "svelte/store";
|
||||
async function createStore(): Promise<Writable<ScrollingTimeframe> & { next: Function; prev: Function }> {
|
||||
const thism = new Date();
|
||||
const lastm = new Date();
|
||||
lastm.setMonth(thism.getMonth() - 1);
|
||||
thism.setMonth(thism.getMonth() - 1);
|
||||
lastm.setMonth(lastm.getMonth() - 2);
|
||||
|
||||
const { subscribe, update, set } = writable({ from: lastm, to: thism });
|
||||
return {
|
||||
|
Reference in New Issue
Block a user