Continued UI redesign

This commit is contained in:
James Babcock committed 2026-07-07 12:06:11 -07:00
1 parent 68ab599856
commit 5f82981b92
20 files changed
+872 -161

No files matched your search

-13
View File
@@ -4,7 +4,6 @@ import { nightscoutBridge } from "../native/nightscout-bridge";
import { getDashboardPlugin, type DashboardPluginCardBounds, type DashboardPluginState } from "./dashboard-plugins";
import { EditTextSettingLayer, isNightscoutSettingsConfigured, type DashboardSlotId, DashboardPluginId, bottomRightSlotSetting, bottomLeftSlotSetting, dashboardSlotIds } from "./dashboard-settings";
import { Layer, LayerActions, LayerStack, type DashboardInputEvent } from "./layers";
import { TelepromptLayer } from "./apps/teleprompt";
import { drawSystemCard } from "./dashboard/system-card";
import { createRootMenuLayer } from "./dashboard/root-menu";
import { inputEventToString, shell } from "./shell/shell";
@@ -18,13 +17,11 @@ export type DashboardBatteryLevels = {
type DashboardState = {
logLines: string[];
telepromptDocumentText: string | null;
battery: DashboardBatteryLevels;
};
export let dashboardState: DashboardState = {
logLines: [] as string[],
telepromptDocumentText: null as string | null,
battery: {
headset: null,
headsetCharging: null,
@@ -76,16 +73,6 @@ export function drawDashboard(): GrayImage {
return dashboardLayers.paint();
}
export function openTelepromptDocument(text?: string): void {
if (text !== undefined) {
dashboardState.telepromptDocumentText = text;
}
shell.wake("window");
dashboardLayers.clearToBase();
dashboardLayers.push(createRootMenuLayer());
dashboardLayers.push(new TelepromptLayer(dashboardState.telepromptDocumentText));
}
export function resetDashboardSleepTimerAndWake(nowMs = Date.now()): boolean {
if (!shell.wake("sidebar", nowMs)) return false;
dashboardLayers.clearToBase();