14 lines
650 B
TypeScript
14 lines
650 B
TypeScript
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;
|
|
}
|