diff --git a/retroshare-qml-app/src/AddTrustedNode.qml b/retroshare-qml-app/src/AddTrustedNode.qml
index f2757aa58..666265f7d 100644
--- a/retroshare-qml-app/src/AddTrustedNode.qml
+++ b/retroshare-qml-app/src/AddTrustedNode.qml
@@ -27,6 +27,8 @@ Item
{
property ApplicationWindow mW
+ property int infoIconHeight: 20
+
Column
{
anchors.fill: parent
@@ -62,51 +64,68 @@ Item
}
}
}
-
- ButtonText
+ Row
{
- id: importButton
- text: qsTr("Import trusted node")
anchors.horizontalCenter: parent.horizontalCenter
- iconUrl: "/icons/paste.svg"
- fontSize: 14
+ spacing: 5
- onClicked:
+ ButtonIcon
{
- var cptext = ClipboardWrapper.getFromClipBoard()
+ height: infoIconHeight
+ anchors.verticalCenter: importButton.verticalCenter
+ width: height
+ imgUrl: "/icons/info.svg"
+ onClicked:
+ {
+ tooltipSpace.show(qsTr("Import a friend certificate from your clipboard.
"+
+ "This will add him as trusted node."))
- console.log("typeof(cptext)", typeof(cptext))
- if(cptext.search("://") > 0)
- mainWindow.handleIntentUri(cptext)
- else
- rsApi.request(
- "/peers/examine_cert/",
- JSON.stringify({cert_string: cptext}),
- function(par)
- {
- console.log("/peers/examine_cert/ CB",
- par.response)
- var resp = JSON.parse(par.response)
- if(resp.returncode === "fail")
+ }
+ }
+
+ ButtonText
+ {
+ id: importButton
+ text: qsTr("Import trusted node")
+ fontSize: 14
+
+ onClicked:
+ {
+ var cptext = ClipboardWrapper.getFromClipBoard()
+
+ console.log("typeof(cptext)", typeof(cptext))
+ if(cptext.search("://") > 0)
+ mainWindow.handleIntentUri(cptext)
+ else
+ rsApi.request(
+ "/peers/examine_cert/",
+ JSON.stringify({cert_string: cptext}),
+ function(par)
{
- importErrorPop.text = resp.debug_msg
- importErrorPop.open()
- return
- }
+ 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: cptext,
- pgpName: jData.name,
- pgpId: jData.pgp_id,
- locationName: jData.location,
- sslIdTxt: jData.peer_id
- }
- )
- }
- )
+ var jData = resp.data
+ stackView.push(
+ "qrc:/TrustedNodeDetails.qml",
+ {
+ nodeCert: cptext,
+ pgpName: jData.name,
+ pgpId: jData.pgp_id,
+ locationName: jData.location,
+ sslIdTxt: jData.peer_id
+ }
+ )
+ }
+ )
+ }
}
}
@@ -139,55 +158,128 @@ Item
}
}
- ButtonText
+ Row
{
anchors.horizontalCenter: parent.horizontalCenter
- text: qsTr("Export own certificate link")
- iconUrl: "/icons/share.svg"
- fontSize: 14
- onClicked:
+ spacing: 5
+
+ ButtonIcon
{
- console.log("onClicked", text)
- rsApi.request(
- "/peers/self/certificate/", "",
- function(par)
- {
- var radix = JSON.parse(par.response).data.cert_string
- var name = mainWindow.user_name
- var encodedName = UriJs.URI.encode(name)
- var nodeUrl = (
- "retroshare://certificate?" +
- "name=" + encodedName +
- "&radix=" + UriJs.URI.encode(radix) +
- "&location=" + encodedName )
- ClipboardWrapper.postToClipBoard(nodeUrl)
- linkCopiedPopup.itemName = name
- linkCopiedPopup.open()
- platformGW.shareUrl(nodeUrl);
- })
+ height: infoIconHeight
+ anchors.verticalCenter: btRsCert.verticalCenter
+ width: height
+ imgUrl: "/icons/info.svg"
+ onClicked:
+ {
+ tooltipSpace.show(qsTr("Share your RetroShare link!
"+
+ "Send it to a friend and start talk!"))
+
+ }
+ }
+
+ ButtonText
+ {
+ id: btRsCert
+ text: qsTr("Export own certificate link")
+ fontSize: 14
+ onClicked:
+ {
+ console.log("onClicked", text)
+ rsApi.request(
+ "/peers/self/certificate/", "",
+ function(par)
+ {
+ var radix = JSON.parse(par.response).data.cert_string
+ var name = mainWindow.user_name
+ var encodedName = UriJs.URI.encode(name)
+ var nodeUrl = (
+ "retroshare://certificate?" +
+ "name=" + encodedName +
+ "&radix=" + UriJs.URI.encode(radix) +
+ "&location=" + encodedName )
+ ClipboardWrapper.postToClipBoard(nodeUrl)
+ linkCopiedPopup.itemName = name
+ linkCopiedPopup.open()
+ platformGW.shareUrl(nodeUrl);
+ })
+ }
}
}
ButtonText
{
+ onClicked: plainCertificateRow.visible = !plainCertificateRow.visible
+ iconUrl: "/icons/options.svg"
anchors.horizontalCenter: parent.horizontalCenter
- text: qsTr("Export own plain certificate")
- fontSize: 14
- iconUrl: "/icons/share.svg"
- onClicked:
- {
- rsApi.request(
- "/peers/self/certificate/", "",
- function(par)
- {
- var radix = JSON.parse(par.response).data.cert_string
- var name = mainWindow.user_name
- ClipboardWrapper.postToClipBoard(radix)
+ color: "white"
+ borderWidth: 1
+ text: qsTr("Advanced")
- linkCopiedPopup.itemName = name
- linkCopiedPopup.open()
- })
+ }
+
+ Row
+ {
+ id: plainCertificateRow
+ anchors.horizontalCenter: parent.horizontalCenter
+ spacing: 5
+ visible: false
+
+ ButtonIcon
+ {
+ height: infoIconHeight
+ anchors.verticalCenter: btPlainCert.verticalCenter
+ width: height
+ imgUrl: "/icons/info.svg"
+ onClicked:
+ {
+ tooltipSpace.show(qsTr("This will copy your RetroShare plain certificate.
"+
+ "Add it manually to your friend client."))
+
+ }
}
+
+ ButtonText
+ {
+ id: btPlainCert
+ text: qsTr("Export own plain certificate")
+ fontSize: 14
+ onClicked:
+ {
+ rsApi.request(
+ "/peers/self/certificate/", "",
+ function(par)
+ {
+ var radix = JSON.parse(par.response).data.cert_string
+ var name = mainWindow.user_name
+ ClipboardWrapper.postToClipBoard(radix)
+
+ linkCopiedPopup.itemName = name
+ linkCopiedPopup.open()
+ })
+
+ }
+ }
+ }
+
+
+ }
+
+ Rectangle
+ {
+ id: tooltipSpace
+ anchors.bottom: parent.bottom
+ anchors.horizontalCenter: parent.horizontalCenter
+
+ ToolTip
+ {
+ id: infoTooltip
+ timeout: 5000
+ Component.onCompleted: show("afafsaf",0)
+ }
+ function show (infoText)
+ {
+ infoTooltip.text = infoText
+ infoTooltip.open()
}
}
diff --git a/retroshare-qml-app/src/TrustedNodesView.qml b/retroshare-qml-app/src/TrustedNodesView.qml
index c53cb3bed..b1778d3d4 100644
--- a/retroshare-qml-app/src/TrustedNodesView.qml
+++ b/retroshare-qml-app/src/TrustedNodesView.qml
@@ -109,7 +109,7 @@ Item
ButtonText
{
id: bottomButton
- text: qsTr("Add Trusted Node")
+ text: qsTr("Add/Share Trusted Node")
anchors.bottom: parent.bottom
onClicked: stackView.push("qrc:/AddTrustedNode.qml")
anchors.horizontalCenter: parent.horizontalCenter
diff --git a/retroshare-qml-app/src/components/SideBar.qml b/retroshare-qml-app/src/components/SideBar.qml
index ac901b423..7e7c536fc 100644
--- a/retroshare-qml-app/src/components/SideBar.qml
+++ b/retroshare-qml-app/src/components/SideBar.qml
@@ -194,6 +194,26 @@ Drawer
ClipboardWrapper.getFromClipBoard(),
handleIntentUri);
},
+ "Share identity": function()
+ {
+ rsApi.request(
+ "/peers/self/certificate/", "",
+ function(par)
+ {
+ var radix = JSON.parse(par.response).data.cert_string
+ var name = mainWindow.user_name
+ var encodedName = UriJs.URI.encode(name)
+ var nodeUrl = (
+ "retroshare://certificate?" +
+ "name=" + encodedName +
+ "&radix=" + UriJs.URI.encode(radix) +
+ "&location=" + encodedName )
+ ClipboardWrapper.postToClipBoard(nodeUrl)
+ linkCopiedPopup.itemName = name
+ linkCopiedPopup.open()
+ platformGW.shareUrl(nodeUrl);
+ })
+ },
"Terminate Core": function()
{
rsApi.request("/control/shutdown");
@@ -219,6 +239,12 @@ Drawer
icon: "/icons/add.svg"
}
ListElement
+ {
+ title: "Share identity"
+ showOnCoreReady: true
+ icon: "/icons/share.svg"
+ }
+ ListElement
{
title: "Terminate Core"
showOnOsAndroid: false
diff --git a/retroshare-qml-app/src/icons/info.svg b/retroshare-qml-app/src/icons/info.svg
new file mode 100644
index 000000000..a83e6d67a
--- /dev/null
+++ b/retroshare-qml-app/src/icons/info.svg
@@ -0,0 +1,60 @@
+
+
diff --git a/retroshare-qml-app/src/qml.qrc b/retroshare-qml-app/src/qml.qrc
index 7ed0fe5d7..5c99edc2f 100644
--- a/retroshare-qml-app/src/qml.qrc
+++ b/retroshare-qml-app/src/qml.qrc
@@ -63,5 +63,6 @@
icons/paste.svg
icons/share.svg
icons/chat-bubble.svg
+ icons/info.svg