Notifications: deep-link on tap + swipe-to-dismiss
CI/CD / CI - API (dotnet build + engine sim) (push) Successful in 5m49s
CI/CD / CI - Web (tsc + next build) (push) Successful in 1m10s
CI/CD / Deploy - local stack (db + server + web) (push) Successful in 49s

Each notification now navigates to its related screen when tapped (toast or
list): friend_request/invite -> Friends, achievement/reward -> Achievements,
daily -> opens the daily-reward modal, coin-purchase success -> Shop. An
explicit per-notification 'route' overrides the kind default.

List rows are swipeable (drag aside) and have an X to dismiss individually,
plus a Clear-all button; the toast can be flicked up to dismiss or tapped to
open. New store actions: markRead/remove/clearAll + openNotification navigator.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
soroush.asadi
2026-06-07 21:38:43 +03:30
parent 72efc03e2d
commit 8d0d4dc991
6 changed files with 179 additions and 23 deletions
+5
View File
@@ -593,6 +593,7 @@ export type NotificationKind =
| "friend_request"
| "invite"
| "achievement"
| "reward"
| "daily"
| "system";
@@ -606,6 +607,10 @@ export interface AppNotification {
icon: string; // emoji
ts: number;
read: boolean;
/** explicit deep-link target screen name (overrides the kind default) */
route?: string;
/** optional payload, e.g. a user id (friend_request) the target screen can use */
payload?: string;
}
/* ------------------------------ Avatars ------------------------------ */