Skip to content

Commit

Permalink
fix(wallet): bring back copy wallet address
Browse files Browse the repository at this point in the history
Depends on StatusQ's StatusAddressPanel generic control

Fixes: #6659
  • Loading branch information
stefandunca committed Aug 5, 2022
1 parent 55cb3c3 commit 39c2ff5
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 37 deletions.
11 changes: 8 additions & 3 deletions ui/app/AppLayouts/Profile/views/wallet/AccountView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,14 @@ Item {
onClicked: Global.openPopup(renameAccountModalComponent)
}
}
StatusAddress {
text: walletStore.currentAccount.address
font.pixelSize: 15
StatusAddressPanel {
address: walletStore.currentAccount.address

font.weight: Font.Normal

showFrame: false

onDoCopy: (address) => globalUtils.copyToClipboard(address)
}
}
}
Expand Down
40 changes: 7 additions & 33 deletions ui/app/AppLayouts/Wallet/panels/WalletHeader.qml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import QtQuick.Layouts 1.13

import StatusQ.Core 0.1
import StatusQ.Controls 0.1
import StatusQ.Components 0.1
import StatusQ.Core.Theme 0.1

import utils 1.0
Expand Down Expand Up @@ -56,40 +57,13 @@ Item {
store: root.walletStore
}

// account address button
Button {
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
}
StatusAddressPanel {
address: currentAccount.mixedcaseAddress

contentItem: RowLayout {
spacing: 4
StatusIcon {
Layout.alignment: Qt.AlignVCenter
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)
autHideCopyIcon: true
expanded: false

onDoCopy: (address) => root.store.copyToClipboard(address)
}
}
}

0 comments on commit 39c2ff5

Please sign in to comment.