mirror of
https://github.com/logos-blockchain/logos-execution-zone-wallet-ui.git
synced 2026-07-29 22:23:30 +00:00
private account copy button copies public keys json
This commit is contained in:
parent
85e4e0e2d7
commit
c375470358
@ -227,6 +227,16 @@ Rectangle {
|
||||
clipHelper.selectAll()
|
||||
clipHelper.copy()
|
||||
}
|
||||
onCopyPublicKeysRequested: (accountIdHex) => {
|
||||
if (!backend) return
|
||||
logos.watch(backend.getPrivateAccountKeys(accountIdHex),
|
||||
function(keys) {
|
||||
clipHelper.text = keys
|
||||
clipHelper.selectAll()
|
||||
clipHelper.copy()
|
||||
},
|
||||
function(error) { console.warn("getPrivateAccountKeys failed:", error) })
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@ ComboBox {
|
||||
// Forwarded from AccountDelegate's copy button — bubble up to the parent
|
||||
// view, which calls backend.copyToClipboard().
|
||||
signal copyRequested(string text)
|
||||
signal copyPublicKeysRequested(string accountIdHex)
|
||||
|
||||
leftPadding: 12
|
||||
rightPadding: 12
|
||||
@ -61,6 +62,7 @@ ComboBox {
|
||||
width: root.popup ? (root.popup.width - root.popup.leftPadding - root.popup.rightPadding) : 368
|
||||
highlighted: root.highlightedIndex === index
|
||||
onCopyRequested: (text) => root.copyRequested(text)
|
||||
onCopyPublicKeysRequested: (id) => root.copyPublicKeysRequested(id)
|
||||
}
|
||||
|
||||
popup: Popup {
|
||||
|
||||
@ -14,6 +14,7 @@ ItemDelegate {
|
||||
// the global QML scope for `backend` since it now lives behind the
|
||||
// logos.module() bridge in the parent view.
|
||||
signal copyRequested(string text)
|
||||
signal copyPublicKeysRequested(string accountIdHex)
|
||||
|
||||
leftPadding: Theme.spacing.medium
|
||||
rightPadding: Theme.spacing.medium
|
||||
@ -77,7 +78,9 @@ ItemDelegate {
|
||||
LogosCopyButton {
|
||||
Layout.preferredHeight: 40
|
||||
Layout.preferredWidth: 40
|
||||
onCopyText: root.copyRequested(Base58.encode(model.address ?? ""))
|
||||
onCopyText: model.isPublic
|
||||
? root.copyRequested(Base58.encode(model.address ?? ""))
|
||||
: root.copyPublicKeysRequested(model.address ?? "")
|
||||
visible: addressLabel.text
|
||||
icon.color: Theme.palette.textMuted
|
||||
}
|
||||
|
||||
@ -21,6 +21,7 @@ Rectangle {
|
||||
signal createPrivateAccountRequested()
|
||||
signal fetchBalancesRequested()
|
||||
signal copyRequested(string text)
|
||||
signal copyPublicKeysRequested(string accountIdHex)
|
||||
|
||||
radius: Theme.spacing.radiusXlarge
|
||||
color: Theme.palette.backgroundSecondary
|
||||
@ -129,6 +130,7 @@ Rectangle {
|
||||
delegate: AccountDelegate {
|
||||
width: listView.width
|
||||
onCopyRequested: (text) => root.copyRequested(text)
|
||||
onCopyPublicKeysRequested: (id) => root.copyPublicKeysRequested(id)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -29,6 +29,7 @@ Rectangle {
|
||||
signal transferShieldedOwnedRequested(string fromAccountId, string toAccountId, string amount)
|
||||
signal transferDeshieldedRequested(string fromAccountId, string toAccountId, string amount)
|
||||
signal copyRequested(string copyText)
|
||||
signal copyPublicKeysRequested(string accountIdHex)
|
||||
|
||||
color: Theme.palette.background
|
||||
|
||||
@ -50,6 +51,7 @@ Rectangle {
|
||||
onCreatePrivateAccountRequested: root.createPrivateAccountRequested()
|
||||
onFetchBalancesRequested: root.fetchBalancesRequested()
|
||||
onCopyRequested: (text) => root.copyRequested(text)
|
||||
onCopyPublicKeysRequested: (id) => root.copyPublicKeysRequested(id)
|
||||
}
|
||||
|
||||
TransferPanel {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user