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
This commit is contained in:
Gio 2016-12-08 21:57:26 +01:00
parent c3aca0cf26
commit 1fa20e16c2

View File

@ -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 }
}
}
}