forked from Blendman974/faceclaw
Add a falling-blocks game
This commit is contained in:
1 parent
bde70ac380
commit
797682a386
6 files changed
+885
-4
No files matched your search
@@ -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).
|
||||
|
||||
Reference in new issue
Block a user