Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(wallet): bring back copy wallet address #6798

Merged
merged 1 commit into from
Aug 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
}
}
}