LogoutPopup: implement export keys button callback

This commit is contained in:
miruka 2019-09-09 14:49:54 -04:00
parent 7c0bed79a9
commit 82f0c273e7
3 changed files with 19 additions and 1 deletions

View File

@ -1,3 +1,5 @@
- ! Banner forget room popup
- Refactoring - Refactoring
- Room header elide detection - Room header elide detection
- Use HBox for Profile - Use HBox for Profile

View File

@ -12,6 +12,9 @@ HFileDialogOpener {
} }
signal done()
property string userId: "" property string userId: ""
property bool exporting: false property bool exporting: false
@ -23,6 +26,7 @@ HFileDialogOpener {
py.callClientCoro(userId, "export_keys", [path, passphrase], () => { py.callClientCoro(userId, "export_keys", [path, passphrase], () => {
exporting = false exporting = false
done()
}) })
} }

View File

@ -1,4 +1,5 @@
import QtQuick 2.12 import QtQuick 2.12
import "../utils.js" as Utils
BoxPopup { BoxPopup {
id: popup id: popup
@ -24,7 +25,18 @@ BoxPopup {
] ]
box.buttonCallbacks: ({ box.buttonCallbacks: ({
ok: button => { ok: button => {
console.error("Not implemented yet") Utils.makeObject(
"Dialogs/ExportKeys.qml",
mainUI,
{ userId },
obj => {
button.loading = Qt.binding(() => obj.exporting)
obj.done.connect(() => {
box.buttonCallbacks["signout"](button)
})
obj.dialog.open()
}
)
}, },
signout: button => { signout: button => {