mirror of
https://github.com/PerpetualSoftware/pad.git
synced 2026-09-24 03:16:43 +00:00
feat(web): add Insights sidebar nav link (TASK-1636) (#644)
Add an "Insights" nav item to the workspace sidebar directly under Dashboard, routing to /[username]/[workspace]/insights (the Reports surface, TASK-1633). Mirrors the existing nav-item pattern with an isInsightsPage active state. No dashboard widget/CTA (owner directive — keep the dashboard uncluttered). Parent: PLAN-1628.
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
let wsPrefix = $derived(wsUsername && wsSlug ? `/${wsUsername}/${wsSlug}` : '');
|
||||
let isGuest = $derived(workspaceStore.current?.is_guest ?? false);
|
||||
let isDashboardPage = $derived(wsPrefix ? page.url.pathname === wsPrefix : false);
|
||||
let isInsightsPage = $derived(wsPrefix ? page.url.pathname === `${wsPrefix}/insights` : false);
|
||||
let isRolesPage = $derived(wsPrefix ? page.url.pathname === `${wsPrefix}/roles` : false);
|
||||
let isActivityPage = $derived(wsPrefix ? page.url.pathname === `${wsPrefix}/activity` : false);
|
||||
let isStarredPage = $derived(wsPrefix ? page.url.pathname === `${wsPrefix}/starred` : false);
|
||||
@@ -412,6 +413,15 @@
|
||||
<span class="nav-icon">📊</span>
|
||||
<span class="nav-label">Dashboard</span>
|
||||
</a>
|
||||
<a
|
||||
href="{wsPrefix}/insights"
|
||||
class="nav-item"
|
||||
class:active={isInsightsPage}
|
||||
onclick={() => uiStore.onNavigate()}
|
||||
>
|
||||
<span class="nav-icon">📈</span>
|
||||
<span class="nav-label">Insights</span>
|
||||
</a>
|
||||
<a
|
||||
href="{wsPrefix}/roles"
|
||||
class="nav-item"
|
||||
|
||||
Reference in New Issue
Block a user