aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/deckit/DeckItModule.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/modules/deckit/DeckItModule.qml')
-rw-r--r--desktop/modules/deckit/DeckItModule.qml27
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 }