Create Cross-signing keys when required
This should be almost entirely in libquotient, but that's not prepared to actually use user-interactive authentication...
This commit is contained in:
33
src/qml/CrossSigningSetupDialog.qml
Normal file
33
src/qml/CrossSigningSetupDialog.qml
Normal file
@@ -0,0 +1,33 @@
|
||||
// SPDX-FileCopyrightText: 2024 Tobias Fella <tobias.fella@kde.org>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
import QtQuick
|
||||
import QtQuick.Controls as QQC2
|
||||
import org.kde.kirigami as Kirigami
|
||||
|
||||
import org.kde.neochat
|
||||
|
||||
Kirigami.PromptDialog {
|
||||
id: root
|
||||
|
||||
required property NeoChatConnection connection
|
||||
|
||||
title: i18nc("@title:dialog", "Setup Encryption Keys")
|
||||
dialogType: Kirigami.PromptDialog.Information
|
||||
|
||||
onRejected: {
|
||||
root.close();
|
||||
}
|
||||
|
||||
footer: QQC2.DialogButtonBox {
|
||||
standardButtons: QQC2.Dialog.Cancel
|
||||
|
||||
QQC2.Button {
|
||||
text: i18nc("@action:button", "Setup Keys")
|
||||
QQC2.DialogButtonBox.buttonRole: QQC2.DialogButtonBox.AcceptRole
|
||||
onClicked: {
|
||||
root.connection.setupCrossSigningKeys("password123");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -309,6 +309,12 @@ Kirigami.ApplicationWindow {
|
||||
url: url
|
||||
}).open();
|
||||
}
|
||||
|
||||
function onCrossSigningSetupRequired() {
|
||||
Qt.createComponent("org.kde.neochat", "CrossSigningSetupDialog").createObject(this, {
|
||||
connection: root.connection
|
||||
}).open();
|
||||
}
|
||||
}
|
||||
|
||||
HoverLinkIndicator {
|
||||
|
||||
Reference in New Issue
Block a user