Add shortcut on sidebar to share RS link

This commit is contained in:
Angela Mazzurco 2017-07-24 15:18:28 +02:00
parent 667b4b3e4c
commit a6d75eb324

View File

@ -194,6 +194,26 @@ Drawer
ClipboardWrapper.getFromClipBoard(), ClipboardWrapper.getFromClipBoard(),
handleIntentUri); 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() "Terminate Core": function()
{ {
rsApi.request("/control/shutdown"); rsApi.request("/control/shutdown");
@ -219,6 +239,12 @@ Drawer
icon: "/icons/add.svg" icon: "/icons/add.svg"
} }
ListElement ListElement
{
title: "Share identity"
showOnCoreReady: true
icon: "/icons/share.svg"
}
ListElement
{ {
title: "Terminate Core" title: "Terminate Core"
showOnOsAndroid: false showOnOsAndroid: false