qml: fix "copy" and "share" buttons for channel backup dialogs
The QR code was shown but the copy/share buttons did not do anything.
This commit is contained in:
@@ -10,7 +10,11 @@ ElDialog {
|
|||||||
|
|
||||||
property string text
|
property string text
|
||||||
property string text_qr
|
property string text_qr
|
||||||
// if text_qr is undefined text will be used
|
// If text is set, it is displayed as a string and also used as data in the QR code shown.
|
||||||
|
// text_qr can also be set if we want to show different data in the QR code.
|
||||||
|
// If only text_qr is set, the QR code is shown but the string itself is not,
|
||||||
|
// however the copy button still exposes the string.
|
||||||
|
|
||||||
property string text_help
|
property string text_help
|
||||||
property int helpTextIconStyle: InfoTextArea.IconStyle.Info
|
property int helpTextIconStyle: InfoTextArea.IconStyle.Info
|
||||||
|
|
||||||
@@ -84,7 +88,7 @@ ElDialog {
|
|||||||
text: qsTr('Copy')
|
text: qsTr('Copy')
|
||||||
icon.source: '../../icons/copy_bw.png'
|
icon.source: '../../icons/copy_bw.png'
|
||||||
onClicked: {
|
onClicked: {
|
||||||
AppController.textToClipboard(dialog.text)
|
AppController.textToClipboard(dialog.text ? dialog.text : dialog.text_qr)
|
||||||
toaster.show(this, qsTr('Copied!'))
|
toaster.show(this, qsTr('Copied!'))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -95,7 +99,7 @@ ElDialog {
|
|||||||
text: qsTr('Share')
|
text: qsTr('Share')
|
||||||
icon.source: '../../icons/share.png'
|
icon.source: '../../icons/share.png'
|
||||||
onClicked: {
|
onClicked: {
|
||||||
AppController.doShare(dialog.text, dialog.title)
|
AppController.doShare(dialog.text ? dialog.text : dialog.text_qr, dialog.title)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user