From c484dad921d46982a675a051cf44bb6be4e14b44 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 10 Nov 2026 11:32:12 +0100 Subject: feat(deckit): status and Restart in the page header Move the deck-it status line from the page body to the header, beside Save, as the Wallpaper engine page does, and send a Restart's outcome to the window's snackbar instead of a line under it. Co-Authored-By: Claude Opus 5.5 --- desktop/modules/deckit/DeckItModule.qml | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) (limited to 'desktop/modules/deckit/DeckItModule.qml') diff --git a/desktop/modules/deckit/DeckItModule.qml b/desktop/modules/deckit/DeckItModule.qml index 2e46302..fbf6bd0 100644 --- a/desktop/modules/deckit/DeckItModule.qml +++ b/desktop/modules/deckit/DeckItModule.qml @@ -45,10 +45,31 @@ Module { page: Component { Page { title: "deck-it" + // Its state in the header, as the Wallpaper engine page does: + // `deck-it status`, polled while the page is open (DeckIt.watchers). actions: Component { - SaveBar { - dirty: DeckIt.store.dirty; valid: DeckIt.store.valid; error: DeckIt.store.error - onSave: DeckIt.save(); onDiscard: DeckIt.store.discard() + Row { + spacing: 8 + Text { + anchors.verticalCenter: parent.verticalCenter + // ponytail: a long summary elides; the header has one line. + width: Math.min(implicitWidth, 420) + elide: Text.ElideRight + text: DeckIt.summary + color: DeckIt.healthy ? Theme.green + : DeckIt.status && (DeckIt.status.server || DeckIt.status.waiting) ? Theme.yellow + : Theme.red + font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 } + } + Button { + text: DeckIt.restartAt ? "Restarting…" : "Restart" + enabled: !DeckIt.restartAt + onClicked: DeckIt.restart() + } + SaveBar { + dirty: DeckIt.store.dirty; valid: DeckIt.store.valid; error: DeckIt.store.error + onSave: DeckIt.save(); onDiscard: DeckIt.store.discard() + } } } DeckItPage { width: parent.width } -- cgit v1.2.3