waveform/lib/constants/member.styles.ts
Chneemann b64356381d
All checks were successful
Deploy Waveform to VPS / deploy (push) Successful in 1m14s
refactor(settings): extract MEMBER_STATUS_OPTIONS into member constants
2026-09-26 20:03:05 +02:00

37 lines
1.4 KiB
TypeScript

/**
* @file lib/constants/member.styles.ts
* @description Tailwind CSS color mapping constants and status options for server members.
*/
import type { UserStatus } from "@/db/schema";
/** Shared Tailwind CSS class constants mapping available member background color keys to their respective CSS utility classes. */
export const MEMBER_COLOR_CLASSES: Record<string, string> = {
"bg-indigo-500": "bg-indigo-500",
"bg-emerald-500": "bg-emerald-500",
"bg-rose-500": "bg-rose-500",
"bg-amber-500": "bg-amber-500",
"bg-sky-500": "bg-sky-500",
"bg-violet-500": "bg-violet-500",
"bg-fuchsia-500": "bg-fuchsia-500",
"bg-cyan-500": "bg-cyan-500",
};
/** List of available color option class names for member icon selection. */
export const MEMBER_COLOR_OPTIONS = Object.keys(MEMBER_COLOR_CLASSES);
/** Mapping of user status keys to their respective Tailwind CSS indicator background colors. */
export const MEMBER_STATUS_COLOR_CLASSES: Record<UserStatus, string> = {
ONLINE: "bg-emerald-500",
OFFLINE: "bg-slate-500",
AFK: "bg-amber-500",
DND: "bg-rose-500",
};
/** Selectable options array for user status values and human-readable labels. */
export const MEMBER_STATUS_OPTIONS: { label: string; value: UserStatus }[] = [
{ label: "Online", value: "ONLINE" },
{ label: "Offline", value: "OFFLINE" },
{ label: "AFK", value: "AFK" },
{ label: "DND", value: "DND" },
];