diff --git a/TODO.md b/TODO.md index a11910b5..93d35d0e 100644 --- a/TODO.md +++ b/TODO.md @@ -1,3 +1,5 @@ +- ! Banner forget room popup + - Refactoring - Room header elide detection - Use HBox for Profile diff --git a/src/qml/Dialogs/ExportKeys.qml b/src/qml/Dialogs/ExportKeys.qml index 21b4194a..2c489a01 100644 --- a/src/qml/Dialogs/ExportKeys.qml +++ b/src/qml/Dialogs/ExportKeys.qml @@ -12,6 +12,9 @@ HFileDialogOpener { } + signal done() + + property string userId: "" property bool exporting: false @@ -23,6 +26,7 @@ HFileDialogOpener { py.callClientCoro(userId, "export_keys", [path, passphrase], () => { exporting = false + done() }) } diff --git a/src/qml/Popups/LogoutPopup.qml b/src/qml/Popups/LogoutPopup.qml index 1fba9393..0fda92e9 100644 --- a/src/qml/Popups/LogoutPopup.qml +++ b/src/qml/Popups/LogoutPopup.qml @@ -1,4 +1,5 @@ import QtQuick 2.12 +import "../utils.js" as Utils BoxPopup { id: popup @@ -24,7 +25,18 @@ BoxPopup { ] box.buttonCallbacks: ({ 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 => {