feat(web): determine initial UI view from URL and wire selected view to appdash; add interface and web README files; bump various dependencies

This commit is contained in:
2026-02-02 22:21:55 +00:00
parent 5b473de354
commit ae34314f54
10 changed files with 790 additions and 338 deletions

View File

@@ -100,10 +100,19 @@ export const configStatePart = await appState.getStatePart<IConfigState>(
}
);
// Determine initial view from URL path
const getInitialView = (): string => {
const path = typeof window !== 'undefined' ? window.location.pathname : '/';
const validViews = ['overview', 'network', 'emails', 'logs', 'configuration', 'security'];
const segments = path.split('/').filter(Boolean);
const view = segments[0];
return validViews.includes(view) ? view : 'overview';
};
export const uiStatePart = await appState.getStatePart<IUiState>(
'ui',
{
activeView: 'overview',
activeView: getInitialView(),
sidebarCollapsed: false,
autoRefresh: true,
refreshInterval: 1000, // 1 second