Load credentials as JSON

This commit is contained in:
Dag Heyman 2017-01-31 08:32:00 +01:00
parent 0cc036b223
commit 0d99184dcb
No known key found for this signature in database
GPG Key ID: 06FC004369E7D338
2 changed files with 3 additions and 4 deletions

View File

@ -64,7 +64,7 @@ class Controller(object):
def refresh_credentials(self):
self._dev_info['credentials'] = [(c.name,c.code) for c in self._calculate_all()]
self._dev_info['credentials'] = [json.dumps(c.__dict__) for c in self._calculate_all()]
def set_mode(self, connections):
dev = self._descriptor.open_device()

View File

@ -6,7 +6,6 @@ import QtQuick.Controls.Styles 1.4
Column {
property var device
width: parent.width
// anchors.fill: parent.width
height: parent.height
property int margin: width / 30
@ -48,10 +47,10 @@ Column {
Column {
Text {
text: qsTr('') + modelData[0]
text: qsTr('') + JSON.parse(modelData)['name']
}
Text {
text: qsTr('') + modelData[1]
text: qsTr('') + JSON.parse(modelData)['code']
font.family: "Chalkboard"
font.bold: true
font.pointSize: 20