mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-14 17:39:37 -04:00
Style view
This commit is contained in:
parent
31d8cdf943
commit
2ef2342363
1 changed files with 91 additions and 26 deletions
|
@ -21,6 +21,7 @@ import QtQuick.Controls 2.0
|
||||||
import org.retroshare.qml_components.LibresapiLocalClient 1.0
|
import org.retroshare.qml_components.LibresapiLocalClient 1.0
|
||||||
import "." //Needed for ClipboardWrapper singleton
|
import "." //Needed for ClipboardWrapper singleton
|
||||||
import "URI.js" as UriJs
|
import "URI.js" as UriJs
|
||||||
|
import "components/."
|
||||||
|
|
||||||
Item
|
Item
|
||||||
{
|
{
|
||||||
|
@ -29,43 +30,46 @@ Item
|
||||||
Column
|
Column
|
||||||
{
|
{
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
spacing: 7
|
||||||
|
|
||||||
Text
|
Text
|
||||||
{
|
{
|
||||||
text: qsTr("Import/export node from/to clipboard")
|
text: qsTr("Import node from clipboard")
|
||||||
font.bold: true
|
font.bold: true
|
||||||
wrapMode: Text.Wrap
|
wrapMode: Text.Wrap
|
||||||
}
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
Button
|
font.pixelSize: 13
|
||||||
{
|
|
||||||
text: qsTr("Export own certificate link")
|
Rectangle
|
||||||
onClicked:
|
|
||||||
{
|
{
|
||||||
console.log("onClicked", text)
|
id: backgroundRectangle
|
||||||
rsApi.request(
|
anchors.fill: parent.fill
|
||||||
"/peers/self/certificate/", "",
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
function(par)
|
width: parent.width + 20
|
||||||
{
|
height: parent.height + 5
|
||||||
var radix = JSON.parse(par.response).data.cert_string
|
|
||||||
var name = mainWindow.user_name
|
color:"transparent"
|
||||||
var encodedName = UriJs.URI.encode(name)
|
|
||||||
var nodeUrl = (
|
Rectangle
|
||||||
"retroshare://certificate?" +
|
{
|
||||||
"name=" + encodedName +
|
id: borderBottom
|
||||||
"&radix=" + UriJs.URI.encode(radix) +
|
width: parent.width
|
||||||
"&location=" + encodedName )
|
height: 1
|
||||||
ClipboardWrapper.postToClipBoard(nodeUrl)
|
anchors.bottom: parent.bottom
|
||||||
linkCopiedPopup.itemName = name
|
anchors.right: parent.right
|
||||||
linkCopiedPopup.open()
|
color: "lightgrey"
|
||||||
platformGW.shareUrl(nodeUrl);
|
}
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Button
|
ButtonText
|
||||||
{
|
{
|
||||||
|
id: importButton
|
||||||
text: qsTr("Import trusted node")
|
text: qsTr("Import trusted node")
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
iconUrl: "/icons/paste.svg"
|
||||||
|
fontSize: 14
|
||||||
|
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
|
@ -106,9 +110,70 @@ Item
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Button
|
Text
|
||||||
{
|
{
|
||||||
|
text: qsTr("Export node")
|
||||||
|
font.bold: true
|
||||||
|
wrapMode: Text.Wrap
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
|
||||||
|
font.pixelSize: 13
|
||||||
|
|
||||||
|
Rectangle
|
||||||
|
{
|
||||||
|
anchors.fill: parent.fill
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
width: parent.width + 20
|
||||||
|
height: parent.height + 5
|
||||||
|
|
||||||
|
color:"transparent"
|
||||||
|
|
||||||
|
Rectangle
|
||||||
|
{
|
||||||
|
width: parent.width
|
||||||
|
height: 1
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.right: parent.right
|
||||||
|
color: "lightgrey"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ButtonText
|
||||||
|
{
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
|
text: qsTr("Export own certificate link")
|
||||||
|
iconUrl: "/icons/share.svg"
|
||||||
|
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
|
||||||
|
{
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
text: qsTr("Export own plain certificate")
|
text: qsTr("Export own plain certificate")
|
||||||
|
fontSize: 14
|
||||||
|
iconUrl: "/icons/share.svg"
|
||||||
onClicked:
|
onClicked:
|
||||||
{
|
{
|
||||||
rsApi.request(
|
rsApi.request(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue