mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
8d6d3d1894
Implement location creation, selection and login Implement people listing Implement firends adding (not working yet) Depend on androidextra qt module only if compiling for android LibresapiLocalClient parse one line at time to avoid error if two requests are sent rapidly one after another LibresapiLocalClient socket path now is a parameter of openConnection() to use it as qml type constructor without parameter must be useful Added JSONListModel for JASON based MVC pattern
40 lines
736 B
QML
40 lines
736 B
QML
import QtQuick 2.0
|
|
import QtQuick.Controls 1.4
|
|
import QtQuick.Layouts 1.3
|
|
import org.retroshare.qml_components.LibresapiLocalClient 1.0
|
|
|
|
Item
|
|
{
|
|
Component.onCompleted:
|
|
{
|
|
rsApi.openConnection(apiSocketPath)
|
|
rsApi.request("/peers/self/certificate/", "")
|
|
}
|
|
|
|
LibresapiLocalClient
|
|
{
|
|
id: rsApi
|
|
onGoodResponseReceived: myKeyField.text = JSON.parse(msg).data.cert_string
|
|
}
|
|
|
|
ColumnLayout
|
|
{
|
|
anchors.top: parent.top
|
|
anchors.bottom: bottomButton.top
|
|
|
|
TextField { id: myKeyField }
|
|
TextField { id: otherKeyField }
|
|
}
|
|
|
|
Button
|
|
{
|
|
id: bottomButton
|
|
text: "Add trusted node"
|
|
anchors.bottom: parent.bottom
|
|
onClicked:
|
|
{
|
|
rsApi.request("/peers/examine_cert/", JSON.stringify({ cert_string: otherKeyField.text }))
|
|
}
|
|
}
|
|
}
|