From 0ada4cdebef9d062c6a647852998ec640ac95bd6 Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Wed, 5 Mar 2025 22:03:38 +0000 Subject: [PATCH] Add a dialog explaining what to do next when tapping "Verify this device" The menu that has this action is now more discoverable, and this menu item is plagued with a bad UX - when you tap on it nothing obvious happens! To people not familiar with device verification they will think this is a bug, but in fact all they need to do is open another verified session on another device. So now there's a dialog explaining that the next step is to do just that. This dialog also closes once the verification session starts, but the user has the option to close it in the meantime. --- src/qml/AccountMenu.qml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/qml/AccountMenu.qml b/src/qml/AccountMenu.qml index 886675fb4..9f56a1fc6 100644 --- a/src/qml/AccountMenu.qml +++ b/src/qml/AccountMenu.qml @@ -87,7 +87,18 @@ KirigamiComponents.ConvergentContextMenu { QQC2.Action { text: i18nc("@action:inmenu", "Verify This Device") icon.name: "security-low" - onTriggered: root.connection.startSelfVerification() + onTriggered: { + root.connection.startSelfVerification(); + const dialog = Qt.createComponent("org.kde.kirigami", "PromptDialog").createObject(QQC2.Overlay.overlay, { + title: i18nc("@title", "Verification Request Sent"), + subtitle: i18nc("@info:label", "To proceed, accept the verification request on another device."), + standardButtons: Kirigami.Dialog.Ok + }) + dialog.open(); + root.connection.onNewKeyVerificationSession.connect(() => { + dialog.close(); + }); + } enabled: Controller.csSupported }