1
0

qml: wallet loading indicator as modal dialog, unclosable

This commit is contained in:
Sander van Grieken
2023-02-23 20:46:56 +01:00
parent e511701c74
commit 32d00b2982
5 changed files with 69 additions and 42 deletions

View File

@@ -171,30 +171,6 @@ ApplicationWindow
}
}
Pane {
id: walletLoadingPane
parent: Overlay.overlay
anchors.fill: parent
background: Rectangle { color: Material.dialogColor }
visible: Daemon.loading
ColumnLayout {
anchors.centerIn: parent
spacing: 2 * constants.paddingXLarge
Label {
Layout.alignment: Qt.AlignHCenter
text: qsTr('Opening wallet...')
font.pixelSize: constants.fontSizeXXLarge
}
BusyIndicator {
Layout.alignment: Qt.AlignHCenter
running: Daemon.loading
}
}
}
Timer {
id: coverTimer
interval: 10
@@ -283,6 +259,14 @@ ApplicationWindow
}
}
property alias loadingWalletDialog: _loadingWalletDialog
Component {
id: _loadingWalletDialog
LoadingWalletDialog {
onClosed: destroy()
}
}
property alias channelOpenProgressDialog: _channelOpenProgressDialog
ChannelOpenProgressDialog {
id: _channelOpenProgressDialog
@@ -409,6 +393,13 @@ ApplicationWindow
function onAuthRequired(method) {
handleAuthRequired(Daemon, method)
}
function onLoadingChanged() {
if (!Daemon.loading)
return
console.log('wallet loading')
var dialog = loadingWalletDialog.createObject(app, { allowClose: false } )
dialog.open()
}
}
Connections {