fix(wallet): improve send modal amount received text
Make it dynamic based on the recipient address Also fix autHideCopyIcon StatusAddressPanel property working independently of showCopy property fixes #9331
This commit is contained in:
parent
03d80ea9fc
commit
d7d9aa2612
|
@ -20,7 +20,7 @@ import StatusQ.Controls 0.1
|
|||
|
||||
\qmlproperty string address address to show
|
||||
\qmlproperty bool showCopy if \c true shows the copy action which triggers \c doCopy signal
|
||||
\qmlproperty bool autHideCopyIcon if \c true shows the copy action when hovered. \see showCopy
|
||||
\qmlproperty bool autHideCopyIcon if \c true and \c showCopy is \c true shows the copy action only when hovered. \see showCopy
|
||||
\qmlproperty alias showFrame if \c true displays frame and \c 0x prefix
|
||||
\qmlproperty bool expandable if \c true user can toggle between expanded and compact version; \see expanded
|
||||
\qmlproperty bool expanded if \c true show address in full; if \c false show the address in compact mode eliding in the middle
|
||||
|
@ -124,8 +124,7 @@ Item {
|
|||
StatusIcon {
|
||||
icon: "copy"
|
||||
|
||||
visible: root.autHideCopyIcon ? (mainMouseArea.containsMouse || copyMouseArea.containsMouse )
|
||||
: root.showCopy
|
||||
visible: root.showCopy && (!root.autHideCopyIcon || (mainMouseArea.containsMouse || copyMouseArea.containsMouse ))
|
||||
|
||||
Layout.alignment: Qt.AlignVCenter
|
||||
Layout.preferredWidth: (statusAddress.font.pixelSize * 1.2).toFixed()
|
||||
|
|
|
@ -445,6 +445,7 @@ StatusDialog {
|
|||
store: popup.store
|
||||
interactive: popup.interactive
|
||||
selectedAccount: popup.selectedAccount
|
||||
ensAddressOrEmpty: d.isENSValid ? d.resolvedENSAddress : ""
|
||||
amountToSend: amountToSendInput.cryptoValueToSend
|
||||
requiredGasInEth: d.totalFeesInEth
|
||||
selectedAsset: assetSelector.selectedAsset
|
||||
|
|
|
@ -18,6 +18,7 @@ Item {
|
|||
property var store
|
||||
property var bestRoutes
|
||||
property var selectedAccount
|
||||
property string ensAddressOrEmpty: ""
|
||||
property var selectedAsset
|
||||
property var allNetworks
|
||||
property bool customMode: false
|
||||
|
@ -152,14 +153,31 @@ Item {
|
|||
id: toNetworksLayout
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignTop
|
||||
spacing: 12
|
||||
StatusBaseText {
|
||||
|
||||
RowLayout {
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignTop
|
||||
Layout.maximumWidth: 100
|
||||
font.pixelSize: 10
|
||||
color: Theme.palette.baseColor1
|
||||
text: !!selectedAccount ? StatusQUtils.Utils.elideText(selectedAccount.address, 6, 4).toUpperCase() : ""
|
||||
elide: Text.ElideMiddle
|
||||
Layout.maximumWidth: 160
|
||||
|
||||
StatusBaseText {
|
||||
id: receiverIdentityText
|
||||
|
||||
text: root.ensAddressOrEmpty.length > 0
|
||||
? root.ensAddressOrEmpty
|
||||
: !!selectedAccount ? StatusQUtils.Utils.elideText(selectedAccount.address, 6, 4).toUpperCase() : ""
|
||||
Layout.fillWidth: true
|
||||
|
||||
font.pixelSize: 10
|
||||
color: Theme.palette.baseColor1
|
||||
elide: Text.ElideMiddle
|
||||
horizontalAlignment: Text.AlignRight
|
||||
}
|
||||
StatusBaseText {
|
||||
font.pixelSize: receiverIdentityText.font.pixelSize
|
||||
color: receiverIdentityText.color
|
||||
text: qsTr("WILL RECEIVE")
|
||||
}
|
||||
}
|
||||
|
||||
Repeater {
|
||||
id: toNetworksRepeater
|
||||
model: root.allNetworks
|
||||
|
|
|
@ -20,6 +20,7 @@ Item {
|
|||
property var store
|
||||
property var currencyStore : store.currencyStore
|
||||
property var selectedAccount
|
||||
property string ensAddressOrEmpty: ""
|
||||
property var selectedAsset
|
||||
property var amountToSend
|
||||
property var requiredGasInEth
|
||||
|
@ -106,6 +107,7 @@ Item {
|
|||
store: root.store
|
||||
customMode: tabBar.currentIndex === 2
|
||||
selectedAccount: root.selectedAccount
|
||||
ensAddressOrEmpty: root.ensAddressOrEmpty
|
||||
amountToSend: root.amountToSend
|
||||
requiredGasInEth: root.requiredGasInEth
|
||||
selectedAsset: root.selectedAsset
|
||||
|
|
|
@ -16,6 +16,7 @@ ColumnLayout {
|
|||
|
||||
property var store
|
||||
property var selectedAccount
|
||||
property string ensAddressOrEmpty: ""
|
||||
property var amountToSend
|
||||
property var requiredGasInEth
|
||||
property bool customMode: false
|
||||
|
@ -83,6 +84,7 @@ ColumnLayout {
|
|||
sourceComponent: NetworkCardsComponent {
|
||||
store: root.store
|
||||
selectedAccount: root.selectedAccount
|
||||
ensAddressOrEmpty: root.ensAddressOrEmpty
|
||||
allNetworks: root.store.allNetworks
|
||||
amountToSend: root.amountToSend
|
||||
customMode: root.customMode
|
||||
|
|
Loading…
Reference in New Issue