Add account / device security settings page

This commit is contained in:
Tobias Fella
2023-10-30 20:20:55 +01:00
parent 4033f07272
commit 8af20885ab
5 changed files with 71 additions and 0 deletions

36
src/qml/Security.qml Normal file
View File

@@ -0,0 +1,36 @@
// SPDX-FileCopyrightText: 2023 Tobias Fella <tobias.fella@kde.org>
// SPDX-License-Identifier: GPL-2.0-or-later
import QtQuick
import QtQuick.Controls
import org.kde.kirigami as Kirigami
import org.kde.kirigamiaddons.formcard as FormCard
import org.kde.neochat
FormCard.FormCardPage {
id: root
required property NeoChatConnection connection
title: i18nc("@title", "Security")
FormCard.FormHeader {
title: i18nc("@title", "Keys")
}
FormCard.FormCard {
FormCard.FormTextDelegate {
text: connection.deviceKey
description: i18n("Device key")
}
FormCard.FormTextDelegate {
text: connection.encryptionKey
description: i18n("Encryption Key")
}
FormCard.FormTextDelegate {
text: connection.deviceId
description: i18n("Device id")
}
}
}

View File

@@ -33,6 +33,17 @@ KirigamiSettings.CategorizedSettings {
icon.name: "preferences-desktop-notification"
page: Qt.resolvedUrl("GlobalNotificationsPage.qml")
},
KirigamiSettings.SettingAction {
actionName: "security"
text: i18n("Security")
icon.name: "preferences-security"
page: Qt.resolvedUrl("Security.qml")
initialProperties: {
return {
connection: root.connection
}
}
},
KirigamiSettings.SettingAction {
actionName: "accounts"
text: i18n("Accounts")