fix: add missing warning state in backup list

This commit is contained in:
Nicolas Meienberger 2026-03-18 19:49:13 +01:00
parent 7fba271107
commit c2c5a1d235
3 changed files with 9 additions and 3 deletions

View file

@ -40,7 +40,7 @@ export const StatusDot = ({ variant, label, animated }: StatusDotProps) => {
return ( return (
<Tooltip> <Tooltip>
<TooltipTrigger> <TooltipTrigger aria-label={label}>
<span className="relative flex size-3 mx-auto"> <span className="relative flex size-3 mx-auto">
{statusMapping?.animated && ( {statusMapping?.animated && (
<span <span

View file

@ -17,7 +17,8 @@ export const BackupCard = ({ schedule }: { schedule: BackupSchedule }) => {
</div> </div>
<BackupStatusDot <BackupStatusDot
enabled={schedule.enabled} enabled={schedule.enabled}
hasError={!!schedule.lastBackupError} hasError={schedule.lastBackupStatus === "error"}
hasWarning={schedule.lastBackupStatus === "warning"}
isInProgress={schedule.lastBackupStatus === "in_progress"} isInProgress={schedule.lastBackupStatus === "in_progress"}
/> />
</div> </div>

View file

@ -3,13 +3,15 @@ import { StatusDot } from "~/client/components/status-dot";
export const BackupStatusDot = ({ export const BackupStatusDot = ({
enabled, enabled,
hasError, hasError,
hasWarning,
isInProgress, isInProgress,
}: { }: {
enabled: boolean; enabled: boolean;
hasError?: boolean; hasError?: boolean;
hasWarning?: boolean;
isInProgress?: boolean; isInProgress?: boolean;
}) => { }) => {
let variant: "success" | "neutral" | "error" | "info"; let variant: "success" | "neutral" | "error" | "warning" | "info";
let label: string; let label: string;
if (isInProgress) { if (isInProgress) {
@ -18,6 +20,9 @@ export const BackupStatusDot = ({
} else if (hasError) { } else if (hasError) {
variant = "error"; variant = "error";
label = "Error"; label = "Error";
} else if (hasWarning) {
variant = "warning";
label = "Warning";
} else if (enabled) { } else if (enabled) {
variant = "success"; variant = "success";
label = "Active"; label = "Active";