fix(@wallet): receive modal

fixes #4534
This commit is contained in:
Anthony Laibe 2022-01-24 12:41:55 +01:00 committed by Sale Djenic
parent 2e3d252fec
commit 234af3283e
4 changed files with 22 additions and 23 deletions

View File

@ -64,11 +64,15 @@ ModalPopup {
}
Input {
id: txtWalletAddress
id: txtWalletAddress
//% "Wallet address"
label: qsTrId("wallet-address")
anchors.top: accountSelector.bottom
anchors.topMargin: Style.current.padding
anchors.left: parent.left
anchors.leftMargin: Style.current.padding
anchors.right: parent.right
anchors.rightMargin: Style.current.padding
copyToClipboard: true
textField.readOnly: true
customHeight: 56

View File

@ -138,9 +138,7 @@ QtObject {
}
function getQrCode(address) {
// TODO: Move to transaction root module and not wallet
// Not Refactored Yet
// return profileModel.qrCode(address)
return globalUtils.qrCode(address)
}
function hex2Dec(value) {

View File

@ -8,6 +8,7 @@ import utils 1.0
import "../panels"
import "../controls"
import "../stores"
Item {
id: inputBox
@ -88,7 +89,7 @@ Item {
anchors.bottom: parent.bottom
anchors.bottomMargin: 0
anchors.right: clipboardButtonLoader.active ? clipboardButtonLoader.left : parent.right
anchors.rightMargin: parent.rightMargin
anchors.rightMargin: clipboardButtonLoader.active ? Style.current.padding : parent.rightMargin
anchors.left: parent.left
anchors.leftMargin: 0
leftPadding: inputBox.hasIcon ? iconWidth + 20 : Style.current.padding
@ -144,7 +145,7 @@ Item {
active: inputBox.copyToClipboard || inputBox.pasteFromClipboard
anchors.verticalCenter: parent.verticalCenter
anchors.right: parent.right
anchors.rightMargin: 8
anchors.rightMargin: Style.current.padding
sourceComponent: Component {
Item {
width: copyBtn.width
@ -172,23 +173,19 @@ Item {
qsTrId("paste")
}
height: 28
font.pixelSize: 12
size: StatusBaseButton.Size.Small
onClicked: {
// Not Refactored Yet
// if (inputBox.copyToClipboard) {
// chatsModel.copyToClipboard(inputBox.textToCopy ? inputBox.textToCopy : inputValue.text)
// } else {
// if (inputValue.canPaste) {
// inputValue.paste()
// }
// }
if (inputBox.copyToClipboard) {
RootStore.copyToClipboard(inputBox.textToCopy ? inputBox.textToCopy : inputValue.text)
} else {
if (inputValue.canPaste) {
inputValue.paste()
}
}
// copyBtn.copied = true
// timer.setTimeout(function() {
// copyBtn.copied = false
// }, 2000);
copyBtn.copied = true
timer.setTimeout(function() {
copyBtn.copied = false
}, 2000);
}
}
}

View File

@ -69,8 +69,8 @@ QtObject {
// return walletModelInst.transactionsView.transferTokens(from, to, address, amount, gasLimit, gasPrice, tipLimit, overallLimit, password, uuid);
}
function copyToClipboard(textToCopy) {
// chatsModelInst.copyToClipboard(textToCopy)
function copyToClipboard(text) {
globalUtils.copyToClipboard(text)
}
property var gifColumnA: chatSectionChatContentInputArea.gifColumnA