From 1fa20e16c233fea9f4157f95e1fb3a8589386b45 Mon Sep 17 00:00:00 2001 From: Gio Date: Thu, 8 Dec 2016 21:57:26 +0100 Subject: [PATCH] Added a dialog to create GXS Identities Now the basic functionaliteis to chat are in place ATM only pseudonymous identities are supported Everything is still very buggy --- retroshare-qml-app/src/qml/Contacts.qml | 32 +++++++++++++++++++++---- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/retroshare-qml-app/src/qml/Contacts.qml b/retroshare-qml-app/src/qml/Contacts.qml index 478b8f19e..b0cf5c3da 100644 --- a/retroshare-qml-app/src/qml/Contacts.qml +++ b/retroshare-qml-app/src/qml/Contacts.qml @@ -18,6 +18,7 @@ import QtQuick 2.0 import QtQuick.Controls 1.4 +import QtQuick.Dialogs 1.2 import org.retroshare.qml_components.LibresapiLocalClient 1.0 Item @@ -39,11 +40,7 @@ Item contactsView.own_gxs_id = json.data[0].gxs_id contactsView.own_nick = json.data[0].name } - else - { - selectedOwnIdentityView.color = "red" - selectedOwnIdentityView.text = "You need to create a GXS identity to chat!" - } + else createIdentityDialog.visible = true }) } @@ -71,6 +68,7 @@ Item anchors.fill: parent onClicked: { + console.log("Contacts view onclicked:", model.name, model.gxs_id) if(model.own) contactsView.own_gxs_id = model.gxs_id else { @@ -105,4 +103,28 @@ Item onTriggered: if(contactsView.visible) contactsView.refreshData() Component.onCompleted: start() } + + + Dialog + { + id: createIdentityDialog + visible: false + title: "You need to create a GXS identity to chat!" + standardButtons: StandardButton.Save + + onAccepted: rsApi.request("/identity/create_identity", JSON.stringify({"name":identityNameTE.text, "pgp_linked": !psdnmCheckBox.checked })) + + TextField + { + id: identityNameTE + width: 300 + } + + Row + { + anchors.top: identityNameTE.bottom + Text { text: "Pseudonymous: " } + CheckBox { id: psdnmCheckBox; checked: true; enabled: false } + } + } }