From e8830b56d847a87376022493cc9b83285d84e827 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Sun, 7 Sep 2025 11:50:04 +0200 Subject: [PATCH] Add "Done" button when verification session is finished It isn't immediately obvious when to close the window, other clients (e.g. Element Web) has a "Got It" button in addition to the regular dialog close button. --- src/app/qml/KeyVerificationDialog.qml | 3 ++- src/app/qml/VerificationMessage.qml | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/app/qml/KeyVerificationDialog.qml b/src/app/qml/KeyVerificationDialog.qml index 6f17b2d04..ed8a68574 100644 --- a/src/app/qml/KeyVerificationDialog.qml +++ b/src/app/qml/KeyVerificationDialog.qml @@ -171,7 +171,8 @@ Kirigami.Page { return ""; } } - onDone: root.QQC2.Window.window.close() + isDone: root.session.state === KeyVerificationSession.DONE + onDone: root.closeDialog() } } diff --git a/src/app/qml/VerificationMessage.qml b/src/app/qml/VerificationMessage.qml index 0bce4f214..c6f66516b 100644 --- a/src/app/qml/VerificationMessage.qml +++ b/src/app/qml/VerificationMessage.qml @@ -13,6 +13,9 @@ ColumnLayout { required property string icon required property string text + required property bool isDone + + signal done anchors.fill: parent @@ -32,6 +35,14 @@ ColumnLayout { horizontalAlignment: Text.AlignHCenter wrapMode: Text.Wrap } + QQC2.Button { + text: i18nc("@action:button Done, we are finished with verification", "Done") + visible: root.isDone + onClicked: root.done() + + Layout.topMargin: Kirigami.Units.largeSpacing + Layout.alignment: Qt.AlignHCenter + } Item { Layout.fillHeight: true }