Group server and host details into task sections

This commit is contained in:
2026-10-05 19:09:15 -04:00
parent cd577b646c
commit 913dc99181
5 changed files with 147 additions and 62 deletions
+13
View File
@@ -0,0 +1,13 @@
export type ServerSection = 'live' | 'matches' | 'configuration' | 'diagnostics' | 'history';
/** Legacy URLs still select their original content inside the new section. */
export function serverSection(tab: string | null): ServerSection {
if (tab === 'matches' || tab === 'history' || tab === 'diagnostics') return tab;
if (tab === 'config' || tab === 'inventory' || tab === 'configuration') return 'configuration';
if (tab === 'logs') return 'diagnostics';
return 'live';
}
export function serverSectionAnchor(tab: string | null): string | null {
return tab === 'chat' || tab === 'logs' || tab === 'inventory' ? tab : null;
}