feat: notifications (#17701)

* feat: notifications

* UI works

* chore: pr feedback

* initial fetch and clear notification upon logging out

* fix: merge

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
Jason Rasmussen
2025-04-28 10:36:14 -04:00
committed by GitHub
parent 23717ce981
commit 1b5fc9c665
55 changed files with 3186 additions and 196 deletions
+5 -1
View File
@@ -10,6 +10,7 @@
import { onMount } from 'svelte';
import { t } from 'svelte-i18n';
import type { PageData } from './$types';
import { notificationManager } from '$lib/stores/notification-manager.svelte';
interface Props {
data: PageData;
@@ -24,7 +25,10 @@
let loading = $state(false);
let oauthLoading = $state(true);
const onSuccess = async () => await goto(AppRoute.PHOTOS, { invalidateAll: true });
const onSuccess = async () => {
await notificationManager.refresh();
await goto(AppRoute.PHOTOS, { invalidateAll: true });
};
const onFirstLogin = async () => await goto(AppRoute.AUTH_CHANGE_PASSWORD);
const onOnboarding = async () => await goto(AppRoute.AUTH_ONBOARDING);