feat(savedaddresses): context menu - copy address

Part 1 of #13094
This commit is contained in:
Sale Djenic 2024-01-10 10:47:29 +01:00 committed by saledjenic
parent 919d4baf53
commit a22847b000
1 changed files with 9 additions and 8 deletions

View File

@ -68,7 +68,7 @@ StatusListItem {
QtObject {
id: d
readonly property string visibleAddress: root.address == Constants.zeroAddress ? root.ens : root.address
readonly property string visibleAddress: !!root.ens? root.ens : root.address
}
components: [
@ -143,15 +143,16 @@ StatusListItem {
})
}
}
StatusAction {
text: qsTr("Copy address")
StatusSuccessAction {
id: copyAddressAction
objectName: "copySavedAddressAction"
assetSettings.name: "copy"
successText: qsTr("Address copied")
text: qsTr("Copy address")
icon.name: "copy"
timeout: 1500
autoDismissMenu: true
onTriggered: {
if (d.visibleAddress)
store.copyToClipboard(d.visibleAddress)
else
store.copyToClipboard(root.ens)
store.copyToClipboard(d.visibleAddress)
}
}
StatusAction {