Turn NeoChatConnection::isVerifiedSession into a notifiable property

This should allow the devices page to hide the "Verify this Device"
warning, once you actually complete verification. I also made sure to
update the other consumer - the menu item under the user menu.

Additionally, I also fixed the password field not being automatically
focused when trying to remove a device.
This commit is contained in:
Joshua Goins
2025-09-05 13:02:41 -04:00
parent fbcb2379fb
commit b3781e0db4
5 changed files with 24 additions and 3 deletions

View File

@@ -38,7 +38,7 @@ FormCard.FormCardPage {
icon.name: "security-low"
text: i18nc("@action:button", "Verify This Device")
description: i18nc("@info:description", "This device is marked as insecure until it's verified by another device. It's recommended to verify as soon as possible.")
visible: !root.connection.isVerifiedSession()
visible: !root.connection.isVerifiedSession
onClicked: {
root.connection.startSelfVerification();
const dialog = Qt.createComponent("org.kde.kirigami", "PromptDialog").createObject(QQC2.Overlay.overlay, {
@@ -94,6 +94,9 @@ FormCard.FormCardPage {
title: i18n("Remove device")
standardButtons: QQC2.Dialog.Cancel
Component.onCompleted: passwordField.forceActiveFocus()
FormCard.FormCard {
FormCard.FormTextFieldDelegate {
id: passwordField