fix(archive): preserve prepared sessions across restarts
This commit is contained in:
@@ -11,7 +11,7 @@ import type {
|
||||
} from "../core/observation/useObservationSessions";
|
||||
import "../styles/observation-sessions.css";
|
||||
|
||||
type SessionVisualState = "ready" | "processing" | "error";
|
||||
type SessionVisualState = "ready" | "processing" | "cold" | "error";
|
||||
|
||||
export function observationSessionVisualState(
|
||||
session: ObservationSessionSummary,
|
||||
@@ -26,12 +26,14 @@ export function observationSessionVisualState(
|
||||
if (session.preparation.state === "ready" && session.replayable) return "ready";
|
||||
return "error";
|
||||
}
|
||||
return session.status === "recording" ? "processing" : "error";
|
||||
if (session.status === "recording") return "processing";
|
||||
return session.replayable ? "cold" : "error";
|
||||
}
|
||||
|
||||
export function observationSessionVisualLabel(state: SessionVisualState): string {
|
||||
if (state === "ready") return "Готово";
|
||||
if (state === "processing") return "Обработка";
|
||||
if (state === "cold") return "Подготовить";
|
||||
return "Ошибка";
|
||||
}
|
||||
|
||||
|
||||
@@ -137,8 +137,12 @@
|
||||
animation: observation-session-processing 1.1s ease-in-out infinite;
|
||||
}
|
||||
|
||||
.observation-session-option i[data-session-visual-state="cold"],
|
||||
.observation-session-option i[data-session-visual-state="error"] {
|
||||
background: var(--nodedc-text-muted);
|
||||
}
|
||||
|
||||
.observation-session-option i[data-session-visual-state="error"] {
|
||||
opacity: 0.48;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user