feat(web-ui): reorganize dashboard views into grouped navigation with new email, access, and network subviews

This commit is contained in:
2026-04-08 08:24:55 +00:00
parent 00fdadb088
commit 2325f01cde
31 changed files with 214 additions and 378 deletions

View File

@@ -4,17 +4,23 @@ import * as appstate from './appstate.js';
const SmartRouter = plugins.domtools.plugins.smartrouter.SmartRouter;
// Flat top-level views (no subviews)
const flatViews = ['overview', 'configuration', 'emails', 'logs', 'apitokens', 'certificates', 'remoteingress', 'vpn'] as const;
const flatViews = ['logs', 'certificates'] as const;
// Tabbed views and their valid subviews
const subviewMap: Record<string, readonly string[]> = {
network: ['activity', 'routes', 'sourceprofiles', 'networktargets', 'targetprofiles'] as const,
security: ['overview', 'blocked', 'authentication', 'emailsecurity'] as const,
overview: ['stats', 'configuration'] as const,
network: ['activity', 'routes', 'sourceprofiles', 'networktargets', 'targetprofiles', 'remoteingress', 'vpn'] as const,
email: ['log', 'security'] as const,
access: ['apitokens'] as const,
security: ['overview', 'blocked', 'authentication'] as const,
};
// Default subview when user visits the bare parent URL
const defaultSubview: Record<string, string> = {
overview: 'stats',
network: 'activity',
email: 'log',
access: 'apitokens',
security: 'overview',
};