mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Merge branch 'qml_app_ui_improve_link_share' into GSoC2017-evaluation-II
This commit is contained in:
commit
1b36ebc188
@ -27,6 +27,8 @@ Item
|
||||
{
|
||||
property ApplicationWindow mW
|
||||
|
||||
property int infoIconHeight: 20
|
||||
|
||||
Column
|
||||
{
|
||||
anchors.fill: parent
|
||||
@ -62,13 +64,29 @@ Item
|
||||
}
|
||||
}
|
||||
}
|
||||
Row
|
||||
{
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
spacing: 5
|
||||
|
||||
ButtonIcon
|
||||
{
|
||||
height: infoIconHeight
|
||||
anchors.verticalCenter: importButton.verticalCenter
|
||||
width: height
|
||||
imgUrl: "/icons/info.svg"
|
||||
onClicked:
|
||||
{
|
||||
tooltipSpace.show(qsTr("Import a friend certificate from your clipboard. <br>"+
|
||||
"This will add him as trusted node."))
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
ButtonText
|
||||
{
|
||||
id: importButton
|
||||
text: qsTr("Import trusted node")
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
iconUrl: "/icons/paste.svg"
|
||||
fontSize: 14
|
||||
|
||||
onClicked:
|
||||
@ -109,6 +127,7 @@ Item
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Text
|
||||
{
|
||||
@ -139,11 +158,29 @@ Item
|
||||
}
|
||||
}
|
||||
|
||||
ButtonText
|
||||
Row
|
||||
{
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
spacing: 5
|
||||
|
||||
ButtonIcon
|
||||
{
|
||||
height: infoIconHeight
|
||||
anchors.verticalCenter: btRsCert.verticalCenter
|
||||
width: height
|
||||
imgUrl: "/icons/info.svg"
|
||||
onClicked:
|
||||
{
|
||||
tooltipSpace.show(qsTr("Share your RetroShare link! <br>"+
|
||||
"Send it to a friend and start talk!"))
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
ButtonText
|
||||
{
|
||||
id: btRsCert
|
||||
text: qsTr("Export own certificate link")
|
||||
iconUrl: "/icons/share.svg"
|
||||
fontSize: 14
|
||||
onClicked:
|
||||
{
|
||||
@ -167,13 +204,45 @@ Item
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ButtonText
|
||||
{
|
||||
onClicked: plainCertificateRow.visible = !plainCertificateRow.visible
|
||||
iconUrl: "/icons/options.svg"
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: "white"
|
||||
borderWidth: 1
|
||||
text: qsTr("Advanced")
|
||||
|
||||
}
|
||||
|
||||
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.<br>"+
|
||||
"Add it manually to your friend client."))
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
ButtonText
|
||||
{
|
||||
id: btPlainCert
|
||||
text: qsTr("Export own plain certificate")
|
||||
fontSize: 14
|
||||
iconUrl: "/icons/share.svg"
|
||||
onClicked:
|
||||
{
|
||||
rsApi.request(
|
||||
@ -187,10 +256,33 @@ Item
|
||||
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()
|
||||
}
|
||||
}
|
||||
|
||||
TimedPopup
|
||||
{
|
||||
id: importErrorPop
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
60
retroshare-qml-app/src/icons/info.svg
Normal file
60
retroshare-qml-app/src/icons/info.svg
Normal file
@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
height="48"
|
||||
viewBox="0 0 48 48"
|
||||
width="48"
|
||||
id="svg2"
|
||||
version="1.1"
|
||||
inkscape:version="0.91 r13725"
|
||||
sodipodi:docname="info.svg">
|
||||
<metadata
|
||||
id="metadata12">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs10" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1366"
|
||||
inkscape:window-height="706"
|
||||
id="namedview8"
|
||||
showgrid="false"
|
||||
inkscape:zoom="4.9166667"
|
||||
inkscape:cx="-8.7457627"
|
||||
inkscape:cy="24.828087"
|
||||
inkscape:window-x="-8"
|
||||
inkscape:window-y="-8"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg2" />
|
||||
<path
|
||||
d="M0 0h48v48h-48z"
|
||||
fill="none"
|
||||
id="path4" />
|
||||
<path
|
||||
d="M 24,-0.06779661 C 10.702542,-0.06779661 -0.06779661,10.702542 -0.06779661,24 -0.06779661,37.297458 10.702542,48.067797 24,48.067797 37.297458,48.067797 48.067797,37.297458 48.067797,24 48.067797,10.702542 37.297458,-0.06779661 24,-0.06779661 Z m 2.40678,36.10169461 -4.81356,0 0,-14.440678 4.81356,0 0,14.440678 z m 0,-19.254237 -4.81356,0 0,-4.813559 4.81356,0 0,4.813559 z"
|
||||
id="path6"
|
||||
style="fill:#039bd5;fill-opacity:1;stroke:none;stroke-opacity:1"
|
||||
inkscape:connector-curvature="0" />
|
||||
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
@ -63,5 +63,6 @@
|
||||
<file>icons/paste.svg</file>
|
||||
<file>icons/share.svg</file>
|
||||
<file>icons/chat-bubble.svg</file>
|
||||
<file>icons/info.svg</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
Loading…
Reference in New Issue
Block a user