Make preview-only mode work

This commit is contained in:
James Babcock committed 2026-08-30 19:17:30 -07:00
1 parent 2d45b65098
commit 602f66f15b
15 files changed
+607 -63

No files matched your search

+5 -1
View File
@@ -4,6 +4,8 @@ export type GlassesDisplayState = {
screenOn: boolean;
battery: number | null;
foregroundTitle: string | null;
/** The headless preview display is standing in for a connection (preview-only mode). */
previewMode: boolean;
};
/** Compact status shown where the foreground-window title normally lives. */
@@ -13,7 +15,9 @@ export function glassesDisplayLabel(state: GlassesDisplayState): string {
if (state.phase === "charging") {
return chargingDisplayLabel(state.battery);
}
if (state.phase !== "connected") {
// Preview mode has a live (simulated) screen despite the disconnected
// phase, so fall through to the screen-state/foreground labels.
if (state.phase !== "connected" && !state.previewMode) {
return "Glasses disconnected";
}
if (state.silentMode) {