Files
AetherForge/server/web/src/help/presencePages.ts

24 lines
768 B
TypeScript

/** Map dashboard routes to human-readable page names for comrade presence. */
const PAGE_LABELS: Record<string, string> = {
'/dashboard': 'Command Deck',
'/agents': 'Crucible',
'/crucible': 'Crucible',
'/forge': 'Forge',
'/builder': 'Forge',
'/mission-deck': 'Mission Deck',
'/builds': 'Builds',
'/emberwake': 'Emberwake',
'/spread': 'Emberwake',
'/settings': 'Calibrate',
'/pathtracer': 'Path Tracer',
};
export function presencePageLabel(path: string): string {
const normalized = path.startsWith('/') ? path : `/${path}`;
return PAGE_LABELS[normalized] ?? (normalized.replace(/^\//, '') || 'Dashboard');
}
export function presenceActivityLine(user: string, page: string): string {
return `${user} is in ${presencePageLabel(page)}`;
}