diff --git a/retroshare-qml-app/src/GxsIdentityDelegate.qml b/retroshare-qml-app/src/GxsIdentityDelegate.qml
index 598a3856a..05cc0026a 100644
--- a/retroshare-qml-app/src/GxsIdentityDelegate.qml
+++ b/retroshare-qml-app/src/GxsIdentityDelegate.qml
@@ -17,6 +17,8 @@
*/
import QtQuick 2.7
+import QtQuick.Controls 2.0
+import "URI.js" as UriJs
Item
{
@@ -111,27 +113,68 @@ Item
anchors.leftMargin: 5
anchors.verticalCenter: parent.verticalCenter
}
- Rectangle
- {
- visible: model.unread_count > 0
+ Row
+ {
anchors.right: parent.right
anchors.rightMargin: 10
anchors.verticalCenter: parent.verticalCenter
- color: "cornflowerblue"
- antialiasing: true
- border.color: "blue"
- border.width: 1
- radius: height/2
height: parent.height - 10
- width: height
- Text
+ Image
{
- color: "white"
- font.bold: true
- text: model.unread_count > 0 ? model.unread_count : ''
- anchors.centerIn: parent
+ source: "qrc:/icons/document-share.png"
+
+ height: parent.height
+ width: height
+
+ MouseArea
+ {
+ anchors.fill: parent
+ onClicked:
+ {
+ rsApi.request(
+ "/identity/export_key",
+ JSON.stringify({ gxs_id: model.gxs_id }),
+ function(par)
+ {
+ var jD = JSON.parse(par.response).data
+ clipboardWrap.text = "retroshare://" +
+ "identity?gxsid=" +
+ model.gxs_id +
+ "&name=" +
+ UriJs.URI.encode(model.name) +
+ "&groupdata=" +
+ UriJs.URI.encode(jD.radix)
+ clipboardWrap.selectAll()
+ clipboardWrap.copy()
+ linkCopiedPopup.itemName = model.name
+ linkCopiedPopup.visible = true
+ }
+ )
+ }
+ }
+ }
+
+ Rectangle
+ {
+ visible: model.unread_count > 0
+
+ color: "cornflowerblue"
+ antialiasing: true
+ border.color: "blue"
+ border.width: 1
+ height: parent.height
+ radius: height/2
+ width: height
+
+ Text
+ {
+ color: "white"
+ font.bold: true
+ text: model.unread_count > 0 ? model.unread_count : ''
+ anchors.centerIn: parent
+ }
}
}
}
diff --git a/retroshare-qml-app/src/icons/document-share.png b/retroshare-qml-app/src/icons/document-share.png
new file mode 100644
index 000000000..45f9f8e3d
Binary files /dev/null and b/retroshare-qml-app/src/icons/document-share.png differ
diff --git a/retroshare-qml-app/src/main-app.qml b/retroshare-qml-app/src/main-app.qml
index 882441b46..36cacfb8a 100644
--- a/retroshare-qml-app/src/main-app.qml
+++ b/retroshare-qml-app/src/main-app.qml
@@ -38,6 +38,7 @@ ApplicationWindow
Component.onCompleted:
{
addUriHandler("/certificate", certificateLinkHandler)
+ addUriHandler("/identity", contactLinkHandler)
var argc = mainArgs.length
for(var i=0; i
" + contactImportPopup.expectedGxsId + + "" + + visible: contactImportPopup.visible && + !contactImportPopup.idMatch() + horizontalAlignment: parent.horizontalCenter + } + } + + Timer + { + id: contactImportTimer + interval: 1500 + onTriggered: contactImportPopup.close() + } + } + + Popup + { + id: linkCopiedPopup + property string itemName + + visible: false + onVisibleChanged: if(visible) contactLinkTimer.start() + + x: parent.x + parent.width/2 - width/2 + y: parent.y + parent.height/2 - height/2 + + Text + { + text: + qsTr("%1 link copied to clipboard").arg( + linkCopiedPopup.itemName) + } + + Timer + { + id: contactLinkTimer + interval: 1500 + onTriggered: linkCopiedPopup.close() + } + } + + TextField { id: clipboardWrap; visible: false } } diff --git a/retroshare-qml-app/src/qml.qrc b/retroshare-qml-app/src/qml.qrc index b735380a8..8882b9c10 100644 --- a/retroshare-qml-app/src/qml.qrc +++ b/retroshare-qml-app/src/qml.qrc @@ -23,5 +23,6 @@
" + contactImportPopup.realGxsId + "