fix(profile/qr) add Copy/Download menu for QR code
add a regular image context menu with: - "Copy image" -> copy the image to clipboard - "Download image" -> downloads the image in the user specified folder Fixes #13479
This commit is contained in:
parent
520b658c09
commit
0f1fc3b241
|
@ -40,6 +40,14 @@ SplitView {
|
||||||
return url
|
return url
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function copyImageToClipboardByUrl(data) {
|
||||||
|
logs.logEvent("Utils::copyImageToClipboardByUrl", ["data"], arguments)
|
||||||
|
}
|
||||||
|
|
||||||
|
function downloadImageByUrl(url, path) {
|
||||||
|
logs.logEvent("Utils::downloadImageByUrl", ["url", "path"], arguments)
|
||||||
|
}
|
||||||
|
|
||||||
Component.onCompleted: {
|
Component.onCompleted: {
|
||||||
Utils.globalUtilsInst = this
|
Utils.globalUtilsInst = this
|
||||||
root.globalUtilsReady = true
|
root.globalUtilsReady = true
|
||||||
|
|
|
@ -9,6 +9,7 @@ import StatusQ.Popups.Dialog 0.1
|
||||||
|
|
||||||
import utils 1.0
|
import utils 1.0
|
||||||
import shared.controls 1.0
|
import shared.controls 1.0
|
||||||
|
import shared.views.chat 1.0
|
||||||
|
|
||||||
StatusDialog {
|
StatusDialog {
|
||||||
id: root
|
id: root
|
||||||
|
@ -37,6 +38,18 @@ StatusDialog {
|
||||||
mipmap: true
|
mipmap: true
|
||||||
smooth: false
|
smooth: false
|
||||||
source: root.qrCode
|
source: root.qrCode
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
acceptedButtons: Qt.RightButton
|
||||||
|
cursorShape: Qt.PointingHandCursor
|
||||||
|
onClicked: qrContextMenu.popup()
|
||||||
|
}
|
||||||
|
|
||||||
|
ImageContextMenu {
|
||||||
|
id: qrContextMenu
|
||||||
|
imageSource: root.qrCode
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
StatusBaseText {
|
StatusBaseText {
|
||||||
|
|
Loading…
Reference in New Issue