mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-12 08:33:05 -04:00
Qml app: fixed import/export of plain certificate
Added TimedPopup that is a common use case so it is reusable without code duplication
This commit is contained in:
parent
39646f32f0
commit
0b82b73131
3 changed files with 72 additions and 7 deletions
|
@ -80,12 +80,21 @@ Item
|
|||
JSON.stringify({cert_string: cptext}),
|
||||
function(par)
|
||||
{
|
||||
console.log("/peers/examine_cert/ CB", par)
|
||||
var jData = JSON.parse(par.response).data
|
||||
console.log("/peers/examine_cert/ CB",
|
||||
par.response)
|
||||
var resp = JSON.parse(par.response)
|
||||
if(resp.returncode === "fail")
|
||||
{
|
||||
importErrorPop.text = resp.debug_msg
|
||||
importErrorPop.open()
|
||||
return
|
||||
}
|
||||
|
||||
var jData = resp.data
|
||||
stackView.push(
|
||||
"qrc:/TrustedNodeDetails.qml",
|
||||
{
|
||||
nodeCert: otherKeyField.text,
|
||||
nodeCert: cptext,
|
||||
pgpName: jData.name,
|
||||
pgpId: jData.pgp_id,
|
||||
locationName: jData.location,
|
||||
|
@ -106,12 +115,26 @@ Item
|
|||
"/peers/self/certificate/", "",
|
||||
function(par)
|
||||
{
|
||||
var jD = JSON.parse(par.response).data
|
||||
ClipboardWrapper.postToClipBoard(jD.cert_string)
|
||||
mainWindow.linkCopiedPopup.itemName=mainWindow.user_name
|
||||
mainWindow.linkCopiedPopup.open()
|
||||
var radix = JSON.parse(par.response).data.cert_string
|
||||
var name = mainWindow.user_name
|
||||
ClipboardWrapper.postToClipBoard(radix)
|
||||
|
||||
linkCopiedPopup.itemName = name
|
||||
linkCopiedPopup.open()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TimedPopup
|
||||
{
|
||||
id: importErrorPop
|
||||
property alias text: popText.text
|
||||
|
||||
Text
|
||||
{
|
||||
id: popText
|
||||
anchors.fill: parent
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue