feat: add push notification support (#73)

* feat: add push notification support

* misc: set localstorage on start
This commit is contained in:
Xylight authored and GitHub committed 2023-08-06 13:00:35 -07:00
1 parent 4f898915b2
commit fc38560eda
6 files changed
+204 -24

No files matched your search

+11 -1
View File
@@ -1,5 +1,8 @@
<script lang="ts">
import { createEventDispatcher } from 'svelte'
export let enabled = false
const dispatcher = createEventDispatcher<{ change: boolean }>()
</script>
<label>
@@ -14,5 +17,12 @@
bg-white dark:bg-zinc-700 {enabled ? 'translate-x-4' : 'translate-x-0'}"
/>
</div>
<input type="checkbox" bind:checked={enabled} class="hidden" />
<input
type="checkbox"
bind:checked={enabled}
class="hidden"
on:input={(e) => {
dispatcher('change', !enabled)
}}
/>
</label>