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
|
||||
}
|
||||
|
||||
function copyImageToClipboardByUrl(data) {
|
||||
logs.logEvent("Utils::copyImageToClipboardByUrl", ["data"], arguments)
|
||||
}
|
||||
|
||||
function downloadImageByUrl(url, path) {
|
||||
logs.logEvent("Utils::downloadImageByUrl", ["url", "path"], arguments)
|
||||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
Utils.globalUtilsInst = this
|
||||
root.globalUtilsReady = true
|
||||
|
|
|
@ -9,6 +9,7 @@ import StatusQ.Popups.Dialog 0.1
|
|||
|
||||
import utils 1.0
|
||||
import shared.controls 1.0
|
||||
import shared.views.chat 1.0
|
||||
|
||||
StatusDialog {
|
||||
id: root
|
||||
|
@ -37,6 +38,18 @@ StatusDialog {
|
|||
mipmap: true
|
||||
smooth: false
|
||||
source: root.qrCode
|
||||
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.RightButton
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: qrContextMenu.popup()
|
||||
}
|
||||
|
||||
ImageContextMenu {
|
||||
id: qrContextMenu
|
||||
imageSource: root.qrCode
|
||||
}
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
|
|
Loading…
Reference in New Issue