diff options
| author | Danilo M. <danix@danix.xyz> | 2026-11-10 11:32:12 +0100 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-11-10 11:32:12 +0100 |
| commit | c484dad921d46982a675a051cf44bb6be4e14b44 (patch) | |
| tree | 6abd400038f13852ac93b1ce7a65fffc64116058 /desktop/modules/deckit/DeckItModule.qml | |
| parent | dc108b1993baadf779b1c4ff06f6c49e0afb97cf (diff) | |
| download | quickshell-c484dad921d46982a675a051cf44bb6be4e14b44.tar.gz quickshell-c484dad921d46982a675a051cf44bb6be4e14b44.zip | |
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 <noreply@anthropic.com>
Diffstat (limited to 'desktop/modules/deckit/DeckItModule.qml')
| -rw-r--r-- | desktop/modules/deckit/DeckItModule.qml | 27 |
1 files changed, 24 insertions, 3 deletions
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 } |
