Route the interactive Panama date menu

This commit is contained in:
Gabriel Brown
2026-08-17 11:32:57 -04:00
parent fb27c5b309
commit 6a1bec849d
6 changed files with 112 additions and 32 deletions
@@ -35,6 +35,10 @@ Singleton {
readonly property bool anyOverlayOpen: activeOverlay !== ""
// The date menu is one surface with two deliberate entry points. The clock
// opens the Daybook; Super+B and notification actions open message history.
property string dateMenuPage: "agenda"
// 0 means "use the currently focused workspace". A positive value lets a
// contextual surface, such as Focus, open Mission Control at its target.
property int overviewWorkspaceId: 0
@@ -48,6 +52,21 @@ Singleton {
root.activeOverlay = name;
}
function openDateMenu(page: string): void {
root.dateMenuPage = page === "notifications" ? "notifications" : "agenda";
root.activeOverlay = "notifications";
}
function toggleDateMenu(page: string): void {
const target = page === "notifications" ? "notifications" : "agenda";
if (root.activeOverlay === "notifications" && root.dateMenuPage === target) {
root.activeOverlay = "";
return;
}
root.dateMenuPage = target;
root.activeOverlay = "notifications";
}
function openOverview(workspaceId: int): void {
root.overviewWorkspaceId = Math.max(0, workspaceId);
root.overviewQuery = "";