Add button to get a QR code for the local user to the account editor page
This commit is contained in:
@@ -13,7 +13,7 @@ Components.AbstractMaximizeComponent {
|
|||||||
id: root
|
id: root
|
||||||
|
|
||||||
required property string text
|
required property string text
|
||||||
required property color avatarColor
|
property color avatarColor
|
||||||
required property string avatarSource
|
required property string avatarSource
|
||||||
|
|
||||||
Shortcut {
|
Shortcut {
|
||||||
|
|||||||
@@ -112,6 +112,22 @@ FormCard.FormCardPage {
|
|||||||
text: root.connection ? root.connection.label : ""
|
text: root.connection ? root.connection.label : ""
|
||||||
}
|
}
|
||||||
FormCard.FormDelegateSeparator {}
|
FormCard.FormDelegateSeparator {}
|
||||||
|
FormCard.FormButtonDelegate {
|
||||||
|
text: i18nc("@action:button", "QR code for account")
|
||||||
|
onClicked: {
|
||||||
|
let qrMax = Qt.createComponent('org.kde.neochat', 'QrCodeMaximizeComponent.qml').createObject(QQC2.ApplicationWindow.overlay, {
|
||||||
|
text: "https://matrix.to/#/" + root.connection.localUser.id,
|
||||||
|
title: root.connection.localUser.displayName,
|
||||||
|
subtitle: root.connection.localUser.id,
|
||||||
|
avatarSource: root.connection.makeMediaUrl(root.connection.localUser.avatarUrl)
|
||||||
|
});
|
||||||
|
if (typeof root.closeDialog === "function") {
|
||||||
|
root.closeDialog();
|
||||||
|
}
|
||||||
|
qrMax.open();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
FormCard.FormDelegateSeparator {}
|
||||||
FormCard.FormButtonDelegate {
|
FormCard.FormButtonDelegate {
|
||||||
text: i18n("Save")
|
text: i18n("Save")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
|
|||||||
Reference in New Issue
Block a user