mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-19 13:11:18 -08:00
Show on the desktop app's taskbar when Plan2Code needs you
AI Assisted
This commit is contained in:
1 parent
765d2b3536
commit
c602dfed57
25 files changed
+1038
-112
No files matched your search
@@ -7,6 +7,7 @@ import { ROLES, ROLE_NOT_SET, ROLE_NOT_SET_LABEL, needsRoleNudge, normalizeRole
|
||||
import { isDashboard } from "../selectors.js";
|
||||
import { el, lightDismiss } from "../render.js";
|
||||
import { page, redraw } from "../state.js";
|
||||
import { framed, onAppMessage, tellApp } from "../app-bridge.js";
|
||||
|
||||
const $ = (id) => document.getElementById(id);
|
||||
|
||||
@@ -552,4 +553,14 @@ export function wireLooks() {
|
||||
saveModels();
|
||||
renderModels();
|
||||
});
|
||||
|
||||
// Desktop app: the taskbar switch, kept by the app in its own app.json. The
|
||||
// app says what it holds once the page is up; checked until it does.
|
||||
if (framed()) {
|
||||
$("looks-desktop").hidden = false;
|
||||
onAppMessage("taskbar-state", (data) => {
|
||||
if (typeof data.on === "boolean") $("looks-taskbar").checked = data.on;
|
||||
});
|
||||
$("looks-taskbar").addEventListener("change", (e) => tellApp("taskbar", { on: e.target.checked }));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user