fix(wallet): bring back copy wallet address

Depends on StatusQ's StatusAddressPanel generic control

Fixes: #6659
This commit is contained in:
Stefan 2022-08-03 14:51:47 +02:00 committed by Stefan Dunca
parent 55cb3c3757
commit 2398b67bc1
3 changed files with 16 additions and 37 deletions

@ -1 +1 @@
Subproject commit 2a377533f8c2d49a8a904c36713fb623972980b7 Subproject commit e47bfa3657cabba97d9643c4afbd7075f8a561e6

View File

@ -74,9 +74,14 @@ Item {
onClicked: Global.openPopup(renameAccountModalComponent) onClicked: Global.openPopup(renameAccountModalComponent)
} }
} }
StatusAddress { StatusAddressPanel {
text: walletStore.currentAccount.address address: walletStore.currentAccount.address
font.pixelSize: 15
font.weight: Font.Normal
showFrame: false
onDoCopy: (address) => globalUtils.copyToClipboard(address)
} }
} }
} }

View File

@ -4,6 +4,7 @@ import QtQuick.Layouts 1.13
import StatusQ.Core 0.1 import StatusQ.Core 0.1
import StatusQ.Controls 0.1 import StatusQ.Controls 0.1
import StatusQ.Components 0.1
import StatusQ.Core.Theme 0.1 import StatusQ.Core.Theme 0.1
import utils 1.0 import utils 1.0
@ -56,40 +57,13 @@ Item {
store: root.walletStore store: root.walletStore
} }
// account address button StatusAddressPanel {
Button { address: currentAccount.mixedcaseAddress
horizontalPadding: Style.current.halfPadding
verticalPadding: 5
Layout.preferredWidth: 150
background: Rectangle {
implicitWidth: 150
implicitHeight: 32
color: "transparent"
border.width: 1
border.color: Theme.palette.baseColor2
radius: 36
}
contentItem: RowLayout { autHideCopyIcon: true
spacing: 4 expanded: false
StatusIcon {
Layout.alignment: Qt.AlignVCenter onDoCopy: (address) => root.store.copyToClipboard(address)
Layout.preferredWidth: 22
Layout.preferredHeight: 22
icon: "address"
color: Theme.palette.baseColor2
}
StatusBaseText {
Layout.alignment: Qt.AlignVCenter
Layout.fillWidth: true
text: currentAccount.mixedcaseAddress
color: Theme.palette.directColor5
elide: Text.ElideMiddle
font.pixelSize: Style.current.primaryTextFontSize
font.weight: Font.Medium
}
}
onClicked: store.copyToClipboard(currentAccount.mixedcaseAddress)
} }
} }
} }