Files
romm/frontend/src/plugins/routeNames.ts
zurdi 8700b005b7 feat(v2): move the audit log into Logs as an Events tab
Logs now opens on Events (admins only), with the backend log a tab away
at ?tab=logs. Events reads as a timeline: grouped by day, the time and a
category-tinted icon on a rail, then the sentence and who, what, where.
Both tabs scroll as one piece under fixed tabs: the toolbar scrolls away
with the rows, and the log shows its newest line on top, holding still
while you read further down. The event list is windowed and pulls the
next page in as its end comes into view.

An admin keeps the page when DISABLE_LOGS_VIEWER turns the log off. The
settings content also sits closer under the nav bar on phones.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 02:07:04 +02:00

65 lines
1.8 KiB
TypeScript

export const ROUTES = {
SETUP: "setup",
LOGIN: "login",
RESET_PASSWORD: "reset-password",
REGISTER: "register",
MAIN: "main",
HOME: "home",
SEARCH: "search",
MUSIC: "music",
PLATFORM: "platform",
COLLECTION: "collection",
VIRTUAL_COLLECTION: "virtual-collection",
SMART_COLLECTION: "smart-collection",
ROM: "rom",
EMULATORJS: "emulatorjs",
JSDOS: "jsdos",
PICO8: "pico8",
RUFFLE: "ruffle",
STREAM: "stream",
STREAM_DESKTOP: "stream-desktop",
SCAN: "scan",
UPLOAD: "upload",
ACTIVITY: "activity",
NOTIFICATIONS: "notifications",
USER_PROFILE: "user-profile",
USER_INTERFACE: "user-interface",
LIBRARY_MANAGEMENT: "library-management",
SCAN_SETTINGS: "scan-settings",
METADATA_SOURCES: "metadata-sources",
CLIENT_API_TOKENS: "client-api-tokens",
ADMINISTRATION: "administration",
SERVER_STATS: "server-stats",
LOGS: "logs",
PAIR: "pair",
PAIR_DEVICE: "pair-device",
APRIL_FOOLS: "april-fools",
CONSOLE_HOME: "console-home",
CONSOLE_PLATFORM: "console-platform",
CONSOLE_COLLECTION: "console-collection",
CONSOLE_SMART_COLLECTION: "console-smart-collection",
CONSOLE_VIRTUAL_COLLECTION: "console-virtual-collection",
CONSOLE_ROM: "console-rom",
CONSOLE_PLAY: "console-play",
PLATFORMS_INDEX: "platforms-index",
COLLECTIONS_INDEX: "collections-index",
CONTROLLER_DEBUG: "controller-debug",
NOT_FOUND: "404",
} as const;
export type RouteName = (typeof ROUTES)[keyof typeof ROUTES];
const authExemptRoutes = [
ROUTES.LOGIN,
ROUTES.SETUP,
ROUTES.RESET_PASSWORD,
ROUTES.REGISTER,
ROUTES.PAIR,
] as const;
type AuthExemptRoute = (typeof authExemptRoutes)[number];
export function isAuthExemptRoute(route: string): route is AuthExemptRoute {
return (authExemptRoutes as readonly string[]).includes(route);
}