2026-04-25 01:47:37 +05:30
|
|
|
import type { StatusKind } from "./types";
|
|
|
|
|
|
2026-04-25 03:24:17 +05:30
|
|
|
/** Shared by the status bar and the settings "Connection" heading. */
|
2026-04-25 01:47:37 +05:30
|
|
|
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 },
|
|
|
|
|
};
|