Simplify QML to work better on both Desktop and Phone

- Set request method to GET by default in ApiLocalConnectionHandler to avoid
/peers request fail randomly
- Use TabView instead of SwipeView to not depend on Qt 5.7.0 (latest version)
- AddTrustedNode simplified layout to avoid unexpected behaviour on some phones
- Locations add sslid property to root Item to avoid unexpected behaviour when
multiple locations are available
- TrustedNodesView color connected friends with green and offline with grey
- Ignore kdevelop 4 files
This commit is contained in:
Gio 2016-10-26 20:37:28 +02:00
parent ea42d822c2
commit 10ec1144eb
6 changed files with 82 additions and 89 deletions

View file

@ -27,19 +27,30 @@ Item
ColumnLayout
{
id: colLayout
anchors.top: parent.top
anchors.bottom: rowLayout.top
anchors.fill: parent
TextField { id: myKeyField }
TextField { id: otherKeyField }
}
RowLayout
{
id: rowLayout
anchors.top: colLayout.bottom
Button
{
id: bottomButton
text: "Add trusted node"
onClicked:
{
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("PUT /peers", JSON.stringify(jsonData))
}
}
Button
{
@ -60,29 +71,8 @@ Item
otherKeyField.paste()
}
}
}
Button
{
id: bottomButton
text: "Add trusted node"
anchors.bottom: parent.bottom
onClicked:
{
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("PUT /peers", JSON.stringify(jsonData))
}
TextField { id: myKeyField }
TextField { id: otherKeyField }
}
}