Reduce the amount of items in the account menu

The devices entry gone (not even Element has this) and so is the logout
action. The Switch account menu item is moved to the bottom so its
easier to access by mouse. The "Open Secret Backup" is moved under
Security settings where it lives next to the other crypto-related
settings.
This commit is contained in:
Joshua Goins
2026-01-15 17:11:10 -05:00
parent f2d3c9706e
commit 5f20a86b62
3 changed files with 23 additions and 30 deletions

View File

@@ -48,15 +48,6 @@ KirigamiComponents.ConvergentContextMenu {
})
}
Kirigami.Action {
text: i18nc("@action:inmenu", "Switch Account")
icon.name: "system-switch-user"
shortcut: "Ctrl+U"
onTriggered: (Qt.createComponent("org.kde.neochat", "AccountSwitchDialog").createObject(QQC2.Overlay.overlay, {
connection: root.connection
}) as Kirigami.Dialog).open();
}
Kirigami.Action {
text: i18nc("@action:inmenu", "Edit This Account")
icon.name: "document-edit"
@@ -71,14 +62,6 @@ KirigamiComponents.ConvergentContextMenu {
}
}
Kirigami.Action {
text: i18nc("@action:inmenu", "Devices")
icon.name: "computer-symbolic"
onTriggered: {
NeoChatSettingsView.open('devices');
}
}
Kirigami.Action {
text: i18nc("@action:inmenu", "Open Developer Tools")
icon.name: "tools"
@@ -92,14 +75,6 @@ KirigamiComponents.ConvergentContextMenu {
})
}
Kirigami.Action {
text: i18nc("@action:inmenu", "Open Secret Backup")
icon.name: "unlock"
onTriggered: root.window.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'UnlockSSSSDialog'), {}, {
title: i18nc("@title:window", "Open Key Backup")
})
}
Kirigami.Action {
text: i18nc("@action:inmenu", "Verify This Device")
icon.name: "security-low"
@@ -129,10 +104,15 @@ KirigamiComponents.ConvergentContextMenu {
}
Kirigami.Action {
text: i18nc("@action:inmenu", "Logout…")
icon.name: "im-kick-user"
onTriggered: (Qt.createComponent("org.kde.neochat", "ConfirmLogoutDialog").createObject(QQC2.Overlay.overlay, {
separator: true
}
Kirigami.Action {
text: i18nc("@action:inmenu", "Switch Account")
icon.name: "system-switch-user"
shortcut: "Ctrl+U"
onTriggered: (Qt.createComponent("org.kde.neochat", "AccountSwitchDialog").createObject(QQC2.Overlay.overlay, {
connection: root.connection
}) as Kirigami.Dialog).open()
}) as Kirigami.Dialog).open();
}
}

View File

@@ -13,7 +13,7 @@ FormCard.FormCardPage {
property bool processing: false
title: i18nc("@title:window", "Load your encrypted messages")
title: i18nc("@title:window", "Manage Secret Backup")
topPadding: Kirigami.Units.gridUnit
leftPadding: 0

View File

@@ -85,6 +85,19 @@ FormCard.FormCardPage {
title: i18nc("@title:group", "Encryption")
}
FormCard.FormCard {
FormCard.FormButtonDelegate {
id: secretBackupDelegate
text: i18nc("@action:inmenu", "Manage Secret Backup")
description: i18nc("@info", "Import or unlock encryption keys from other devices.")
icon.name: "unlock"
onClicked: root.QQC2.ApplicationWindow.window.pageStack.pushDialogLayer(Qt.createComponent('org.kde.neochat', 'UnlockSSSSDialog'), {}, {
title: i18nc("@title:window", "Manage Secret Backup")
})
}
FormCard.FormDelegateSeparator {
above: secretBackupDelegate
below: importKeysDelegate
}
FormCard.FormButtonDelegate {
id: importKeysDelegate
text: i18nc("@action:button", "Import Keys")