Route the interactive Panama date menu
This commit is contained in:
@@ -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 = "";
|
||||
|
||||
Reference in New Issue
Block a user