aboutsummaryrefslogtreecommitdiffstats
path: root/desktop/modules/sbbuilder/SbbVmModule.qml
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/modules/sbbuilder/SbbVmModule.qml')
-rw-r--r--desktop/modules/sbbuilder/SbbVmModule.qml32
1 files changed, 23 insertions, 9 deletions
diff --git a/desktop/modules/sbbuilder/SbbVmModule.qml b/desktop/modules/sbbuilder/SbbVmModule.qml
index 8b9cebc..45c7216 100644
--- a/desktop/modules/sbbuilder/SbbVmModule.qml
+++ b/desktop/modules/sbbuilder/SbbVmModule.qml
@@ -32,7 +32,7 @@ Module {
["genreprc", "genreprc"], ["slackrepo_logdir", "slackrepo logs"], ["phantom_deps_file", "Phantom deps"]]
searchItems: fields.map(f => ({ text: f[1], key: "/" + f[0] }))
.concat(Sbb.vm.manifests.map(p => ({ text: p + " manifest", key: "manifests/" + p })))
- function refresh() { Sbb.refresh(); }
+ function refresh() { Sbb.fetch(false); }
page: Component {
Page {
@@ -50,20 +50,33 @@ Module {
spacing: 6
readonly property var st: Sbb.vm
property string confirming: ""
- Text {
+ Item {
width: col.width
- wrapMode: Text.Wrap
- text: Sbb.busy ? "Asking the VM..."
- : Sbb.reachable ? Sbb.vmPath + " on the VM. The helper checks a save and keeps the old file as .bak."
- : "The VM did not answer, so nothing here can change. Start it, then reopen this page."
- color: Sbb.reachable || Sbb.busy ? Theme.subtext : Theme.yellow
- font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 }
+ height: Math.max(status.implicitHeight, reload.height)
+ Text {
+ id: status
+ anchors { left: parent.left; right: reload.left; rightMargin: 8; verticalCenter: parent.verticalCenter }
+ wrapMode: Text.Wrap
+ text: Sbb.busy ? "Asking the VM..."
+ : Sbb.reachable ? Sbb.vmPath + " on the VM. The helper checks a save and keeps the old file as .bak."
+ : "The VM did not answer, so nothing here can change. Start it, then Reload."
+ color: Sbb.reachable || Sbb.busy ? Theme.subtext : Theme.yellow
+ font { family: Theme.fontFamily; pixelSize: Theme.fontSize - 4 }
+ }
+ Button {
+ id: reload
+ anchors { right: parent.right; verticalCenter: parent.verticalCenter }
+ text: "Reload"
+ enabled: !Sbb.busy
+ onClicked: Sbb.fetch(false)
+ }
}
Column {
width: col.width
spacing: 6
- enabled: Sbb.reachable
+ // Read-only while a save runs too: typing then would be lost or mis-recorded.
+ enabled: Sbb.reachable && !Sbb.busy
opacity: Sbb.reachable ? 1 : 0.5
Repeater {
model: [
@@ -116,6 +129,7 @@ Module {
id: url
width: parent.width - del.width - 8
store: col.st; section: "manifests"; key: mrow.modelData; label: mrow.modelData
+ placeholder: "a URL; Remove deletes the row"
}
Button {
id: del