fix(@wallet): trim tx data
This commit is contained in:
parent
abd1672e90
commit
d9ed23b2d6
|
@ -155,7 +155,7 @@ Popup {
|
|||
anchors.topMargin: Style.current.padding
|
||||
color: Style.current.transparent
|
||||
textToCopy: accountSelector.selectedAccount.address
|
||||
store: RootStore
|
||||
onCopyClicked: RootStore.copyToClipboard(textToCopy)
|
||||
}
|
||||
|
||||
StatusFlatRoundButton {
|
||||
|
|
|
@ -51,8 +51,8 @@ StatusListItem {
|
|||
id: copyButton
|
||||
type: StatusRoundButton.Type.Tertiary
|
||||
icon.color: root.showButtons ? Theme.palette.directColor1 : Theme.palette.baseColor1
|
||||
store: root.store
|
||||
textToCopy: root.address
|
||||
onCopyClicked: root.store.copyToClipboard(textToCopy)
|
||||
},
|
||||
StatusRoundButton {
|
||||
objectName: "savedAddressView_Delegate_favouriteButton"
|
||||
|
|
|
@ -238,8 +238,8 @@ StatusModal {
|
|||
spacing: 5
|
||||
CopyToClipBoardButton {
|
||||
id: copyToClipBoard
|
||||
store: RootStore
|
||||
textToCopy: txtWalletAddress.text
|
||||
onCopyClicked: RootStore.copyToClipboard(textToCopy)
|
||||
}
|
||||
StatusBaseText {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
|
|
@ -116,30 +116,12 @@ Item {
|
|||
expanded: true
|
||||
}
|
||||
|
||||
StatusListItem {
|
||||
id: data
|
||||
width: parent.width
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
|
||||
color: "transparent"
|
||||
border.width: 1
|
||||
border.color: Theme.palette.directColor8
|
||||
|
||||
statusListItemTitle.color: Theme.palette.baseColor1
|
||||
|
||||
title: qsTr("Data" )
|
||||
subTitle: root.isTransactionValid ? root.transaction.input : ""
|
||||
components: [
|
||||
CopyToClipBoardButton {
|
||||
icon.width: 15
|
||||
icon.height: 15
|
||||
type: StatusRoundButton.Type.Tertiary
|
||||
color: "transparent"
|
||||
icon.color: data.showButtons ? Theme.palette.directColor1 : Theme.palette.baseColor1
|
||||
store: RootStore
|
||||
textToCopy: data.subTitle
|
||||
}
|
||||
]
|
||||
InformationTile {
|
||||
maxWidth: parent.width
|
||||
primaryText: qsTr("Data")
|
||||
secondaryText: root.isTransactionValid ? root.transaction.input : ""
|
||||
copy: true
|
||||
onCopyClicked: RootStore.copyToClipboard(textToCopy)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,8 @@ StatusRoundButton {
|
|||
property var onClick: function() {}
|
||||
property string textToCopy: ""
|
||||
property bool tooltipUnder: false
|
||||
property var store
|
||||
|
||||
signal copyClicked(string textToCopy)
|
||||
|
||||
icon.name: "copy"
|
||||
|
||||
|
@ -21,7 +22,7 @@ StatusRoundButton {
|
|||
}
|
||||
onClicked: {
|
||||
if (textToCopy) {
|
||||
store.copyToClipboard(textToCopy)
|
||||
copyToClipboardButton.copyClicked(textToCopy)
|
||||
}
|
||||
onClick()
|
||||
}
|
||||
|
|
|
@ -17,8 +17,11 @@ Rectangle {
|
|||
property alias tagsModel: tags.model
|
||||
property alias tagsDelegate: tags.delegate
|
||||
property int maxWidth: 0
|
||||
property bool copy: false
|
||||
|
||||
implicitHeight: 52
|
||||
signal copyClicked(string textToCopy)
|
||||
|
||||
implicitHeight: root.copy ? 75 : 52
|
||||
implicitWidth: layout.width + Style.current.xlPadding
|
||||
radius: Style.current.radius
|
||||
border.width: 1
|
||||
|
@ -37,14 +40,27 @@ Rectangle {
|
|||
visible: text
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
RowLayout {
|
||||
width: 100
|
||||
StatusBaseText {
|
||||
id: secondaryText
|
||||
Layout.maximumWidth: root.maxWidth - Style.current.xlPadding
|
||||
Layout.maximumWidth: root.maxWidth - Style.current.xlPadding - (root.copy ? 50 : 0)
|
||||
font.pixelSize: 15
|
||||
color: Theme.palette.directColor1
|
||||
visible: text
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
CopyToClipBoardButton {
|
||||
visible: root.copy
|
||||
icon.width: 15
|
||||
icon.height: 15
|
||||
type: StatusRoundButton.Type.Tertiary
|
||||
color: "transparent"
|
||||
icon.color: Theme.palette.directColor1
|
||||
textToCopy: secondaryText.text
|
||||
onCopyClicked: root.copyClicked(textToCopy)
|
||||
}
|
||||
}
|
||||
ScrollView {
|
||||
Layout.preferredHeight: 24
|
||||
Layout.maximumWidth: root.maxWidth - Style.current.xlPadding
|
||||
|
|
|
@ -234,7 +234,7 @@ Item {
|
|||
Layout.preferredHeight: 20
|
||||
color: Style.current.transparent
|
||||
textToCopy: pubkey
|
||||
store: root.store
|
||||
onCopyClicked: root.store.copyToClipboard(textToCopy)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -83,7 +83,7 @@ Item {
|
|||
anchors.verticalCenter: parent.verticalCenter
|
||||
color: Style.current.transparent
|
||||
textToCopy: root.address
|
||||
store: root.store
|
||||
onCopyClicked: root.store.copyToClipboard(textToCopy)
|
||||
MouseArea {
|
||||
anchors.fill: parent
|
||||
propagateComposedEvents: true
|
||||
|
|
|
@ -47,7 +47,7 @@ Item {
|
|||
anchors.left: parent.right
|
||||
anchors.leftMargin: Style.current.smallPadding
|
||||
color: Style.current.transparent
|
||||
store: root.store
|
||||
onCopyClicked: root.store.copyToClipboard(textToCopy)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue