KeyVerificationPopup: make details copiable

This commit is contained in:
miruka 2020-07-11 15:51:31 -04:00
parent f05f2357c7
commit 224e82f38c

View File

@ -70,25 +70,24 @@ HFlickableColumnPopup {
text: qsTr("Do these info match on your other session?") text: qsTr("Do these info match on your other session?")
} }
HSelectableLabel { HTextArea {
function formatInfo(info, value) { function formatInfo(info, value) {
return ( return (
`<li style="line-height: 110%">` + `<p style="line-height: 115%">` +
info + info +
`<span style="font-family: ${theme.fontFamily.mono}">` + `<span style="font-family: ${theme.fontFamily.mono}">` +
value + "&nbsp;" + value +
`</span></li><br style="line-height: 25%">` `</span></p>`
) )
} }
wrapMode: Text.Wrap readOnly: true
wrapMode: HSelectableLabel.Wrap
textFormat: Qt.RichText textFormat: Qt.RichText
text: ( text: (
"<ul>" +
formatInfo(qsTr("Session name:"), popup.deviceName) + formatInfo(qsTr("Session name:"), popup.deviceName) +
formatInfo(qsTr("Session ID:"), popup.deviceId) + formatInfo(qsTr("Session ID:"), popup.deviceId) +
formatInfo(qsTr("Session key: "), "<b>"+popup.ed25519Key+"</b>") + formatInfo(qsTr("Session key:"), "<b>"+ popup.ed25519Key+"</b>")
"</ul>"
) )
Layout.fillWidth: true Layout.fillWidth: true