mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-14 09:29:30 -04:00
Implemented certificate link handling
Move content of qml directory to parent directory src Message notification take care of plurar/singular Fix compilation of service for non-android linux AddTrustedNode.qml show node details for confirmation before adding Added TrustedNodeDetails.qml to show nodes details TrustedNodesView.qml show node details on click Qml app added minimal infrastructure to delegate link handling Removed unused icons
This commit is contained in:
parent
f6d44f1a46
commit
d2598dd437
37 changed files with 326 additions and 115 deletions
83
retroshare-qml-app/src/AddTrustedNode.qml
Normal file
83
retroshare-qml-app/src/AddTrustedNode.qml
Normal file
|
@ -0,0 +1,83 @@
|
|||
import QtQuick 2.0
|
||||
import QtQuick.Controls 2.0
|
||||
import QtQuick.Layouts 1.3
|
||||
import org.retroshare.qml_components.LibresapiLocalClient 1.0
|
||||
|
||||
Item
|
||||
{
|
||||
function refreshData() { rsApi.request("/peers/self/certificate/", "") }
|
||||
|
||||
Component.onCompleted:
|
||||
{
|
||||
rsApi.openConnection(apiSocketPath)
|
||||
refreshData()
|
||||
}
|
||||
onFocusChanged: focus && refreshData()
|
||||
|
||||
LibresapiLocalClient
|
||||
{
|
||||
id: rsApi
|
||||
onGoodResponseReceived:
|
||||
{
|
||||
var jsonData = JSON.parse(msg)
|
||||
if(jsonData && jsonData.data && jsonData.data.cert_string)
|
||||
myKeyField.text = jsonData.data.cert_string
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout
|
||||
{
|
||||
anchors.fill: parent
|
||||
|
||||
Button
|
||||
{
|
||||
id: bottomButton
|
||||
text: "Add trusted node"
|
||||
onClicked:
|
||||
{
|
||||
rsApi.request(
|
||||
"/peers/examine_cert/",
|
||||
JSON.stringify({cert_string: otherKeyField.text}),
|
||||
function(par)
|
||||
{
|
||||
console.log("/peers/examine_cert/ CB", par)
|
||||
var jData = JSON.parse(par.response).data
|
||||
stackView.push(
|
||||
"qrc:/TrustedNodeDetails.qml",
|
||||
{
|
||||
nodeCert: otherKeyField.text,
|
||||
pgpName: jData.name,
|
||||
pgpId: jData.pgp_id,
|
||||
locationName: jData.location,
|
||||
sslIdTxt: jData.peer_id
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Button
|
||||
{
|
||||
text: "Copy"
|
||||
onClicked:
|
||||
{
|
||||
myKeyField.selectAll()
|
||||
myKeyField.copy()
|
||||
}
|
||||
}
|
||||
|
||||
Button
|
||||
{
|
||||
text: "Paste"
|
||||
onClicked:
|
||||
{
|
||||
otherKeyField.selectAll()
|
||||
otherKeyField.paste()
|
||||
}
|
||||
}
|
||||
|
||||
TextField { id: myKeyField }
|
||||
TextField { id: otherKeyField }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue