UserDetailDialog: Remove double QR code action
Now it's part of the header
This commit is contained in:
@@ -117,19 +117,19 @@ Kirigami.Dialog {
|
|||||||
|
|
||||||
QQC2.AbstractButton {
|
QQC2.AbstractButton {
|
||||||
contentItem: Barcode {
|
contentItem: Barcode {
|
||||||
id: barcode
|
|
||||||
barcodeType: Barcode.QRCode
|
barcodeType: Barcode.QRCode
|
||||||
content: "https://matrix.to/#/" + root.user.id
|
content: root.shareUrl
|
||||||
}
|
}
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.close();
|
|
||||||
const map = Qt.createComponent('org.kde.neochat', 'QrCodeMaximizeComponent').createObject(QQC2.Overlay.overlay, {
|
const map = Qt.createComponent('org.kde.neochat', 'QrCodeMaximizeComponent').createObject(QQC2.Overlay.overlay, {
|
||||||
text: barcode.content,
|
text: root.shareUrl,
|
||||||
title: root.displayName,
|
title: root.displayName,
|
||||||
subtitle: root.user.id,
|
subtitle: root.user.id,
|
||||||
|
avatarColor: root.room?.member(root.user.id).color,
|
||||||
avatarSource: avatar.source,
|
avatarSource: avatar.source,
|
||||||
});
|
}) as QrCodeMaximizeComponent;
|
||||||
|
root.close();
|
||||||
map.open();
|
map.open();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -185,22 +185,6 @@ Kirigami.Dialog {
|
|||||||
root.close();
|
root.close();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Kirigami.Action {
|
|
||||||
text: i18nc("@action:intoolbar", "Show QR Code")
|
|
||||||
icon.name: "view-barcode-qr-symbolic"
|
|
||||||
|
|
||||||
onTriggered: {
|
|
||||||
let qrCode = Qt.createComponent('org.kde.neochat', 'QrCodeMaximizeComponent').createObject(QQC2.Overlay.overlay, {
|
|
||||||
text: root.shareUrl,
|
|
||||||
title: root.room ? root.room.member(root.user.id).displayName : root.user.displayName,
|
|
||||||
subtitle: root.user.id,
|
|
||||||
avatarColor: root.room?.member(root.user.id).color,
|
|
||||||
avatarSource: root.room? root.room.member(root.user.id).avatarUrl : root.user.avatarUrl
|
|
||||||
}) as QrCodeMaximizeComponent;
|
|
||||||
root.close();
|
|
||||||
qrCode.open();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
Kirigami.Action {
|
Kirigami.Action {
|
||||||
text: i18nc("@action:button 'Report' as in 'Report this user to the administrators'", "Report…")
|
text: i18nc("@action:button 'Report' as in 'Report this user to the administrators'", "Report…")
|
||||||
icon.name: "dialog-warning-symbolic"
|
icon.name: "dialog-warning-symbolic"
|
||||||
|
|||||||
Reference in New Issue
Block a user