From a6d75eb32494e757e84f23d78ef71cdf3865163d Mon Sep 17 00:00:00 2001 From: Angela Mazzurco Date: Mon, 24 Jul 2017 15:18:28 +0200 Subject: [PATCH] Add shortcut on sidebar to share RS link --- retroshare-qml-app/src/components/SideBar.qml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) 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