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.
This commit is contained in:
Joshua Goins
2025-09-07 11:50:04 +02:00
parent bbf2587908
commit e8830b56d8
2 changed files with 13 additions and 1 deletions

View File

@@ -171,7 +171,8 @@ Kirigami.Page {
return "";
}
}
onDone: root.QQC2.Window.window.close()
isDone: root.session.state === KeyVerificationSession.DONE
onDone: root.closeDialog()
}
}

View File

@@ -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
}