forked from coracle/flotilla
Move alerts to their own page, add direct message alerts
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
<script lang="ts">
|
||||
import {onDestroy} from "svelte"
|
||||
import {page} from "$app/stores"
|
||||
import Chat from "@app/components/Chat.svelte"
|
||||
import {setChecked} from "@app/util/notifications"
|
||||
import {notifications, setChecked} from "@app/util/notifications"
|
||||
|
||||
onDestroy(() => {
|
||||
setChecked($page.url.pathname)
|
||||
// We have to watch this one, since on mobile the badge will be visible when active
|
||||
$effect(() => {
|
||||
if ($notifications.has($page.url.pathname)) {
|
||||
setChecked($page.url.pathname)
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user