mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-02 06:06:10 -04:00
Advances on trusted node addings
ApiServerLocal trim method/path line to avoid white spaces parsing ApiServerLocal add support for passing METHOD in request AddTrustedNode.qml add ability to copy and paste keys
This commit is contained in:
parent
48a9be0ccc
commit
cf1c49aa3a
5 changed files with 76 additions and 54 deletions
|
@ -27,13 +27,41 @@ Item
|
|||
|
||||
ColumnLayout
|
||||
{
|
||||
id: colLayout
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: bottomButton.top
|
||||
anchors.bottom: rowLayout.top
|
||||
|
||||
Text { id: myKeyField }
|
||||
|
||||
TextField { id: myKeyField }
|
||||
TextField { id: otherKeyField }
|
||||
}
|
||||
|
||||
RowLayout
|
||||
{
|
||||
id: rowLayout
|
||||
anchors.top: colLayout.bottom
|
||||
|
||||
Button
|
||||
{
|
||||
text: "Copy"
|
||||
onClicked:
|
||||
{
|
||||
myKeyField.selectAll()
|
||||
myKeyField.copy()
|
||||
}
|
||||
}
|
||||
|
||||
Button
|
||||
{
|
||||
text: "Paste"
|
||||
onClicked:
|
||||
{
|
||||
otherKeyField.selectAll()
|
||||
otherKeyField.paste()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Button
|
||||
{
|
||||
id: bottomButton
|
||||
|
@ -41,7 +69,20 @@ Item
|
|||
anchors.bottom: parent.bottom
|
||||
onClicked:
|
||||
{
|
||||
rsApi.request("/peers/examine_cert/", JSON.stringify({ cert_string: otherKeyField.text }))
|
||||
console.log("retroshare addtrusted: ", otherKeyField.text)
|
||||
var jsonData =
|
||||
{
|
||||
cert_string: otherKeyField.text,
|
||||
flags:
|
||||
{
|
||||
allow_direct_download: true,
|
||||
allow_push: false,
|
||||
require_whitelist: false,
|
||||
}
|
||||
}
|
||||
console.log("retroshare addtrusted jsonData: ", JSON.stringify(jsonData))
|
||||
//rsApi.request("/peers/examine_cert/", JSON.stringify({ cert_string: otherKeyField.text }))
|
||||
rsApi.request("POST /peers", JSON.stringify(jsonData))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue