Add a falling-blocks game

This commit is contained in:
James Babcock committed 2026-07-26 02:48:41 -07:00
1 parent bde70ac380
commit 797682a386
6 files changed
+885 -4

No files matched your search

+14
View File
@@ -276,6 +276,7 @@ class DashboardController {
{ appId: "calendar", label: "Calendar", icon: "calendar" },
{ appId: "weather", label: "Weather", icon: "cloud-sun" },
{ appId: "navigate", label: "Navigate", icon: "map" },
{ appId: "blocks", label: "Blocks", icon: "l-piece" },
{ appId: "debug-tests", label: "Debug tests", icon: "flask-conical" },
{ appId: "settings", label: "Settings", icon: "settings" },
],
@@ -1198,6 +1199,8 @@ class DashboardController {
worker = new Worker("../workers/terminal-app.worker");
} else if (appId === "navigate") {
worker = new Worker("../workers/navigate-app.worker");
} else if (appId === "blocks") {
worker = new Worker("../workers/blocks-app.worker");
} else {
return null;
}
@@ -1306,6 +1309,17 @@ class DashboardController {
this.appendLog("launched timer:main");
return;
}
if (appId === "blocks") {
const existing = shell.getWindows().find((window) => window.appId === "blocks");
if (existing) {
shell.focusWindow(existing.windowId);
this.requestShellRender();
return;
}
host.openWindow({ windowId: "blocks:main", title: "Blocks", iconLetter: "B", icon: "l-piece", focus: true });
this.appendLog("launched blocks:main");
return;
}
if (appId === "navigate") {
// Navigation needs precise location; prompt on the phone while the
// window opens (the worker can't show permission dialogs).