summaryrefslogtreecommitdiffstats
path: root/framework/qml
diff options
context:
space:
mode:
authorMinijackson <minijackson@riseup.net>2018-03-01 11:13:22 +0100
committerMinijackson <minijackson@riseup.net>2018-03-08 16:29:09 +0100
commitf6e8b7ff01c7de0a7b7613bf46b51adf3a8a59a1 (patch)
tree15263afda758e6384c97b779b3452be66a817cca /framework/qml
parentef3433a40e23c56a3a9c6158fde06729e7b0cd12 (diff)
downloadkube-f6e8b7ff01c7de0a7b7613bf46b51adf3a8a59a1.tar.gz
kube-f6e8b7ff01c7de0a7b7613bf46b51adf3a8a59a1.zip
Add key import
Diffstat (limited to 'framework/qml')
-rw-r--r--framework/qml/AttachmentDelegate.qml10
-rw-r--r--framework/qml/Icons.qml1
-rw-r--r--framework/qml/MailViewer.qml2
3 files changed, 13 insertions, 0 deletions
diff --git a/framework/qml/AttachmentDelegate.qml b/framework/qml/AttachmentDelegate.qml
index 3c308e65..4469cbdd 100644
--- a/framework/qml/AttachmentDelegate.qml
+++ b/framework/qml/AttachmentDelegate.qml
@@ -23,10 +23,12 @@ Item {
23 id: root 23 id: root
24 24
25 property string name 25 property string name
26 property string type
26 property string icon 27 property string icon
27 property alias actionIcon: actionButton.iconName 28 property alias actionIcon: actionButton.iconName
28 signal clicked; 29 signal clicked;
29 signal execute; 30 signal execute;
31 signal publicKeyImport;
30 32
31 width: content.width + Kube.Units.smallSpacing * 1.5 33 width: content.width + Kube.Units.smallSpacing * 1.5
32 height: content.height + Kube.Units.smallSpacing 34 height: content.height + Kube.Units.smallSpacing
@@ -70,6 +72,14 @@ Item {
70 color: Kube.Colors.backgroundColor 72 color: Kube.Colors.backgroundColor
71 } 73 }
72 Kube.IconButton { 74 Kube.IconButton {
75 visible: root.type == "application/pgp-keys"
76 iconName: Kube.Icons.key_import_inverted
77 height: Kube.Units.gridUnit
78 width: height
79 onClicked: root.publicKeyImport()
80 padding: 0
81 }
82 Kube.IconButton {
73 id: actionButton 83 id: actionButton
74 height: Kube.Units.gridUnit 84 height: Kube.Units.gridUnit
75 width: height 85 width: height
diff --git a/framework/qml/Icons.qml b/framework/qml/Icons.qml
index 2afe840e..4dfae3d7 100644
--- a/framework/qml/Icons.qml
+++ b/framework/qml/Icons.qml
@@ -63,6 +63,7 @@ Item {
63 property string secure: "document-encrypt" 63 property string secure: "document-encrypt"
64 property string insecure: "document-decrypt" 64 property string insecure: "document-decrypt"
65 property string signed: "document-sign" 65 property string signed: "document-sign"
66 property string key_import_inverted: "view-certificate-import-inverted"
66 67
67 property string addNew: "list-add" 68 property string addNew: "list-add"
68 property string remove: "kube-list-remove-inverted" 69 property string remove: "kube-list-remove-inverted"
diff --git a/framework/qml/MailViewer.qml b/framework/qml/MailViewer.qml
index 565adedd..e9ffd108 100644
--- a/framework/qml/MailViewer.qml
+++ b/framework/qml/MailViewer.qml
@@ -283,6 +283,7 @@ Rectangle {
283 283
284 delegate: AttachmentDelegate { 284 delegate: AttachmentDelegate {
285 name: model.name 285 name: model.name
286 type: model.type
286 icon: model.iconName 287 icon: model.iconName
287 288
288 clip: true 289 clip: true
@@ -290,6 +291,7 @@ Rectangle {
290 actionIcon: Kube.Icons.save_inverted 291 actionIcon: Kube.Icons.save_inverted
291 onExecute: messageParser.attachments.saveAttachmentToDisk(messageParser.attachments.index(index, 0)) 292 onExecute: messageParser.attachments.saveAttachmentToDisk(messageParser.attachments.index(index, 0))
292 onClicked: messageParser.attachments.openAttachment(messageParser.attachments.index(index, 0)) 293 onClicked: messageParser.attachments.openAttachment(messageParser.attachments.index(index, 0))
294 onPublicKeyImport: messageParser.attachments.importPublicKey(messageParser.attachments.index(index, 0))
293 } 295 }
294 } 296 }
295 } 297 }