6de2455917
- Added GLOBAL_MARKETS_TITLE to all translation files - Updated footer with 12 markets (4 active + 8 upcoming) - Translated market section to: zh-cn, zh-tw, ja, ko, th, vi, id, ms, hi - Built and deployed to production - CloudFront invalidation: I3RTMXVFDJXWLG3SYX208OP1CC
70 lines
1.8 KiB
TypeScript
70 lines
1.8 KiB
TypeScript
import type { UserRole, AuditAction, ModuleStatus } from "./types";
|
|
|
|
export const MODULE_ICONS: Record<string, string> = {
|
|
watchman: "👁",
|
|
digest: "📰",
|
|
research: "🔬",
|
|
scheduler: "⏱",
|
|
notifications: "🔔",
|
|
api_gateway: "🌐",
|
|
auth: "🔐",
|
|
database: "🗄",
|
|
cache: "⚡",
|
|
logger: "📋",
|
|
metrics: "📊",
|
|
mail: "✉️",
|
|
workers: "⚙️",
|
|
storage: "💾",
|
|
webhooks: "🪝",
|
|
ai_pipeline: "🤖",
|
|
build_monitor: "🏗",
|
|
default: "📦",
|
|
};
|
|
|
|
export const ACTION_COLORS: Record<AuditAction, string> = {
|
|
login: "#22c55e",
|
|
logout: "#94a3b8",
|
|
module_toggle: "#3b82f6",
|
|
settings_update: "#f59e0b",
|
|
user_create: "#10b981",
|
|
user_update: "#6366f1",
|
|
user_delete: "#ef4444",
|
|
api_key_rotate: "#f97316",
|
|
system_restart: "#ec4899",
|
|
};
|
|
|
|
export const ROLE_LABELS: Record<UserRole, string> = {
|
|
superadmin: "Super Admin",
|
|
admin: "Admin",
|
|
operator: "Operator",
|
|
viewer: "Viewer",
|
|
};
|
|
|
|
export const ROLE_PERMISSIONS: Record<UserRole, string[]> = {
|
|
superadmin: ["*"],
|
|
admin: ["modules.*", "users.*", "audit.read", "settings.*"],
|
|
operator: ["modules.toggle", "modules.read", "audit.read", "settings.read"],
|
|
viewer: ["modules.read", "audit.read", "settings.read"],
|
|
};
|
|
|
|
export const MODULE_STATUS_LABELS: Record<ModuleStatus, string> = {
|
|
active: "Active",
|
|
inactive: "Inactive",
|
|
error: "Error",
|
|
loading: "Loading…",
|
|
};
|
|
|
|
export const MODULE_STATUS_COLORS: Record<ModuleStatus, string> = {
|
|
active: "#22c55e",
|
|
inactive: "#94a3b8",
|
|
error: "#ef4444",
|
|
loading: "#f59e0b",
|
|
};
|
|
|
|
export const DEFAULT_PAGE_SIZE = 25;
|
|
export const MAX_PAGE_SIZE = 100;
|
|
export const TOKEN_EXPIRY_SECONDS = 3600;
|
|
export const REFRESH_TOKEN_EXPIRY_SECONDS = 86400 * 7;
|
|
export const AUDIT_RETENTION_DAYS = 90;
|
|
export const METRICS_POLL_INTERVAL_MS = 5000;
|