mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-05-05 22:02:39 +02:00
- Added refreshStatus method to update connection status immediately after settings changes. - Enhanced error reporting with reportAuthError method for better authentication feedback. - Updated status visuals in the status modal to reflect the new centralized structure. - Improved connection handling in the settings tab to ensure accurate status representation.
18 lines
757 B
TypeScript
18 lines
757 B
TypeScript
import type { StatusKind } from "./types";
|
|
|
|
/** Shared by the status bar and the settings "Connection" heading. */
|
|
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 },
|
|
"needs-setup": { icon: "cloud-off", label: "Setup required", isError: false },
|
|
offline: { icon: "wifi-off", label: "Offline", isError: false },
|
|
"auth-error": { icon: "alert-circle", label: "Reauthenticate", isError: true },
|
|
error: { icon: "alert-circle", label: "Error", isError: true },
|
|
};
|