/** * Shared runtime constants used by the frontend UI. */ import type { BanOriginFilter, TimeRange } from "../types/ban"; // --------------------------------------------------------------------------- // UI Constants // --------------------------------------------------------------------------- export const BAN_ORIGIN_FILTER_LABELS: Record = { all: "All", blocklist: "Blocklist", selfblock: "Selfblock", } as const; export const TIME_RANGE_LABELS: Record = { "24h": "Last 24 h", "7d": "Last 7 days", "30d": "Last 30 days", "365d": "Last 365 days", } as const; /** Items per page for the ban dashboard table. */ export const BAN_PAGE_SIZE = 100 as const; /** Items per page for the history table. */ export const HISTORY_PAGE_SIZE = 50 as const; // --------------------------------------------------------------------------- // Storage Keys // --------------------------------------------------------------------------- /** SessionStorage key for authentication state persistence. */ export const STORAGE_KEY_AUTHENTICATED = "bangui_authenticated" as const; /** LocalStorage key for sidebar collapsed state. */ export const STORAGE_KEY_SIDEBAR_COLLAPSED = "bangui_sidebar_collapsed" as const; /** LocalStorage key for theme preference. */ export const STORAGE_KEY_THEME = "bangui_theme" as const;