2026-04-25 01:47:37 +05:30
|
|
|
import type { StatusKind } from "./types";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Single source of truth for status icons + labels. Both the status bar
|
|
|
|
|
* and the settings "Connection" heading render from this table so a change
|
|
|
|
|
* here updates both surfaces.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
export interface StatusVisual {
|
|
|
|
|
icon: string;
|
|
|
|
|
label: string;
|
|
|
|
|
isError: boolean;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export const STATUS_VISUALS: Record<StatusKind, StatusVisual> = {
|
|
|
|
|
idle: { icon: "check-circle", label: "Synced", isError: false },
|
|
|
|
|
syncing: { icon: "refresh-ccw", label: "Syncing", isError: false },
|
|
|
|
|
queued: { icon: "clock", label: "Queued", isError: false },
|
2026-04-25 02:16:38 +05:30
|
|
|
"needs-setup": { icon: "cloud-off", label: "Setup required", isError: false },
|
2026-04-25 01:47:37 +05:30
|
|
|
offline: { icon: "wifi-off", label: "Offline", isError: false },
|
2026-04-25 02:16:38 +05:30
|
|
|
"auth-error": { icon: "alert-circle", label: "Reauthenticate", isError: true },
|
2026-04-25 01:47:37 +05:30
|
|
|
error: { icon: "alert-circle", label: "Error", isError: true },
|
|
|
|
|
};
|