From 2be2087a95d5c7be664b8b3ef4f3fe2a8ad83c63 Mon Sep 17 00:00:00 2001 From: Marcel Date: Thu, 7 May 2026 21:40:23 +0200 Subject: [PATCH] feat(dashboard): wire reader layout to +page.svelte MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds conditional {#if data.isReader} block that renders the 5-zone reader layout (StatsStrip → DraftsModule → PersonChips → two-column docs/stories row) for READ_ALL-only users, while preserving the existing contributor layout for WRITE_ALL / ANNOTATE_ALL users. Co-Authored-By: Claude Sonnet 4.6 --- frontend/src/routes/+page.svelte | 84 ++++++++++++++++++++++---------- 1 file changed, 57 insertions(+), 27 deletions(-) diff --git a/frontend/src/routes/+page.svelte b/frontend/src/routes/+page.svelte index 2512be89..86e073c2 100644 --- a/frontend/src/routes/+page.svelte +++ b/frontend/src/routes/+page.svelte @@ -5,6 +5,11 @@ import MissionControlStrip from '$lib/document/MissionControlStrip.svelte'; import DashboardFamilyPulse from '$lib/shared/dashboard/DashboardFamilyPulse.svelte'; import DashboardActivityFeed from '$lib/activity/DashboardActivityFeed.svelte'; import EnrichmentBlock from '$lib/document/EnrichmentBlock.svelte'; +import ReaderStatsStrip from '$lib/shared/dashboard/ReaderStatsStrip.svelte'; +import ReaderPersonChips from '$lib/shared/dashboard/ReaderPersonChips.svelte'; +import ReaderDraftsModule from '$lib/shared/dashboard/ReaderDraftsModule.svelte'; +import ReaderRecentDocs from '$lib/shared/dashboard/ReaderRecentDocs.svelte'; +import ReaderRecentStories from '$lib/shared/dashboard/ReaderRecentStories.svelte'; import { m } from '$lib/paraglide/messages.js'; let { data } = $props(); @@ -31,36 +36,61 @@ const greetingText = $derived.by(() => { {/if} -
+ {#if data.isReader}
- - - (bannerCount = 0)} + -
-

- {m.dashboard_mission_caption()} -

- -
-
- -
- - - {#if data.canWrite} - (bannerCount = count)} /> + {#if data.canBlogWrite} + {/if} + + + +
+
+ +
+
+ +
+
-
+ {:else} +
+
+ + + (bannerCount = 0)} + /> + +
+

+ {m.dashboard_mission_caption()} +

+ +
+
+ +
+ + + {#if data.canWrite} + (bannerCount = count)} /> + {/if} +
+
+ {/if}