fix(ProfileDialogView): impossible to copy one's chat key
put a little label below the emoji hash with the elided compressed chat key plus a copy button with a tooltip Fixes #11665
This commit is contained in:
parent
035f0b8122
commit
45784cf0cd
|
@ -327,6 +327,32 @@ Pane {
|
|||
objectName: "ProfileDialog_userEmojiHash"
|
||||
publicKey: root.publicKey
|
||||
}
|
||||
RowLayout {
|
||||
StatusBaseText {
|
||||
font.pixelSize: 12
|
||||
color: Theme.palette.baseColor1
|
||||
text: Utils.getElidedCompressedPk(root.publicKey)
|
||||
}
|
||||
StatusFlatButton {
|
||||
size: StatusFlatButton.Size.Tiny
|
||||
icon.name: "copy"
|
||||
enabled: !d.timer.running
|
||||
|
||||
onClicked: {
|
||||
copyKeyTooltip.text = qsTr("Copied")
|
||||
root.profileStore.copyToClipboard(Utils.getCompressedPk(root.publicKey))
|
||||
d.timer.setTimeout(function() {
|
||||
copyKeyTooltip.text = qsTr("Copy Chat Key")
|
||||
}, 1500);
|
||||
}
|
||||
|
||||
StatusToolTip {
|
||||
id: copyKeyTooltip
|
||||
text: qsTr("Copy Chat Key")
|
||||
visible: parent.hovered || d.timer.running
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loader {
|
||||
|
|
Loading…
Reference in New Issue