feat(web-ui): reorganize dashboard views into grouped navigation with new email, access, and network subviews
This commit is contained in:
@@ -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',
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user