From 31a6293e982e212ea5136659dcccce271fe37be1 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 16 Oct 2026 11:18:31 +0200 Subject: feat(desktop): pages can open other pages and step back to them Page gains go(name), wired to the drawer's show(). Module gains up, the page back() returns to, empty for the grid as before. The back arrow now calls back() instead of clearing the page itself, so the arrow, Escape and the mouse's back button agree. For the git page, opened from the user page. Co-Authored-By: Claude Sonnet 5.5 --- desktop/Drawer.qml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'desktop/Drawer.qml') diff --git a/desktop/Drawer.qml b/desktop/Drawer.qml index 27b90fc..7855823 100644 --- a/desktop/Drawer.qml +++ b/desktop/Drawer.qml @@ -69,11 +69,12 @@ Scope { root.open = true; } - // One step out: history, then a page, then the drawer itself. Escape - // and the mouse's back button. + // One step out: history, then a page (to its module's `up`, the grid by + // default), then the drawer itself. Escape, the mouse's back button and + // a page's back arrow. function back() { if (root.history) root.history = false; - else if (root.page) root.page = ""; + else if (root.page) root.page = root.current?.up ?? ""; else root.close(); } @@ -238,12 +239,13 @@ Scope { active: root.current !== null sourceComponent: root.current?.page ?? null - // The Page's back arrow returns to the grid. Without this - // the header button is inert, since the page only emits - // `back` and does not know who hosts it. + // The Page's back arrow steps out as Escape does. Without + // this the header button is inert, since the page only + // emits `back` and does not know who hosts it. onLoaded: { - if (item && item.back) item.back.connect(() => root.page = ""); + if (item && item.back) item.back.connect(root.back); if (item && item.dismiss) item.dismiss.connect(root.close); + if (item && item.go) item.go.connect(root.show); } // The page header shows the module's tile glyph. A Binding, -- cgit v1.2.3