Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions BarWidget.qml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,16 @@ import "Model.js" as Model
Item {
id: root

// Widget setting (manifest barWidget.schema): absolute vault path.
property string vaultPath: ""
// Host settings. Lathe Bar.qml injectProps assigns `target.settings =
// moduleSettings` when the widget declares this property — it never
// assigns vaultPath directly. The manifest schema key is vaultPath.
property var settings: ({})

// Derived from settings.vaultPath (schema key). Empty/missing keeps
// the empty-vault failed status.
readonly property string vaultPath:
(settings && typeof settings.vaultPath === "string")
? settings.vaultPath : ""

// Status from Model.js. Starts as the empty-vault failed status;
// a run only replaces it when a vault path is set.
Expand Down Expand Up @@ -51,7 +59,7 @@ Item {
}
}

onVaultPathChanged: rerun()
onSettingsChanged: rerun()
Component.onCompleted: rerun()

Process {
Expand Down
Loading