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