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:
@@ -171,7 +171,8 @@ Kirigami.Page {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
onDone: root.QQC2.Window.window.close()
|
||||
isDone: root.session.state === KeyVerificationSession.DONE
|
||||
onDone: root.closeDialog()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user