From f89ba50a602dbb93013de4a9d594bc257adf9ee7 Mon Sep 17 00:00:00 2001 From: oppiliappan Date: Wed, 19 Aug 2026 12:44:26 +0100 Subject: [PATCH] web/components: add notifications preview to timeline Signed-off-by: oppiliappan --- .../NotificationsPreview.stories.svelte | 16 ++++++++ .../timeline/NotificationsPreview.svelte | 37 +++++++++++++++++++ .../components/timeline/PreviewEmpty.svelte | 16 ++++++++ web/src/routes/timeline/+page.svelte | 14 +++++-- 4 files changed, 80 insertions(+), 3 deletions(-) create mode 100644 web/src/lib/components/timeline/NotificationsPreview.stories.svelte create mode 100644 web/src/lib/components/timeline/NotificationsPreview.svelte create mode 100644 web/src/lib/components/timeline/PreviewEmpty.svelte diff --git a/web/src/lib/components/timeline/NotificationsPreview.stories.svelte b/web/src/lib/components/timeline/NotificationsPreview.stories.svelte new file mode 100644 index 00000000..047e321a --- /dev/null +++ b/web/src/lib/components/timeline/NotificationsPreview.stories.svelte @@ -0,0 +1,16 @@ + + + + + + diff --git a/web/src/lib/components/timeline/NotificationsPreview.svelte b/web/src/lib/components/timeline/NotificationsPreview.svelte new file mode 100644 index 00000000..866cb352 --- /dev/null +++ b/web/src/lib/components/timeline/NotificationsPreview.svelte @@ -0,0 +1,37 @@ + + + + {#snippet action()} + + View all + + {/snippet} + + {#if signedIn} + +

All caught up!

+
+ {:else} + + Log in to view your inbox + + {/if} +
diff --git a/web/src/lib/components/timeline/PreviewEmpty.svelte b/web/src/lib/components/timeline/PreviewEmpty.svelte new file mode 100644 index 00000000..10e6a433 --- /dev/null +++ b/web/src/lib/components/timeline/PreviewEmpty.svelte @@ -0,0 +1,16 @@ + + +
+
diff --git a/web/src/routes/timeline/+page.svelte b/web/src/routes/timeline/+page.svelte index 0b978193..4600cb4a 100644 --- a/web/src/routes/timeline/+page.svelte +++ b/web/src/routes/timeline/+page.svelte @@ -3,6 +3,7 @@ import GalleryVertical from "$icon/gallery-vertical"; import Button from "$lib/components/ui/Button.svelte"; import ButtonGroup from "$lib/components/ui/ButtonGroup.svelte"; + import NotificationsPreview from "$lib/components/timeline/NotificationsPreview.svelte"; import Timeline from "$lib/components/timeline/Timeline.svelte"; import TrendingRepos from "$lib/components/timeline/TrendingRepos.svelte"; import type { PageData } from "./$types"; @@ -15,9 +16,16 @@
-
+ + + +

@@ -49,7 +57,7 @@
-- 2.51.2