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