summaryrefslogtreecommitdiff
path: root/web-ui/app
diff options
context:
space:
mode:
Diffstat (limited to 'web-ui/app')
-rw-r--r--web-ui/app/js/mail_view/ui/mail_view.js17
-rw-r--r--web-ui/app/locales/en_US/translation.json1
-rw-r--r--web-ui/app/scss/views/_security-labels.scss6
-rw-r--r--web-ui/app/templates/mails/full_view.hbs5
4 files changed, 29 insertions, 0 deletions
diff --git a/web-ui/app/js/mail_view/ui/mail_view.js b/web-ui/app/js/mail_view/ui/mail_view.js
index 029707c1..48672c9a 100644
--- a/web-ui/app/js/mail_view/ui/mail_view.js
+++ b/web-ui/app/js/mail_view/ui/mail_view.js
@@ -51,6 +51,7 @@ define(
data.mail.security_casing = data.mail.security_casing || {};
signed = this.checkSigned(data.mail);
encrypted = this.checkEncrypted(data.mail);
+ mixnet = this.checkMixnet(data.mail);
attachments = data.mail.attachments.map(function (attachment) {
attachment.received = true;
return attachment;
@@ -68,6 +69,7 @@ define(
ident: data.mail.ident,
tags: data.mail.tags,
encryptionStatus: encrypted,
+ mixnetStatus: mixnet,
signatureStatus: signed,
attachments: attachments
}));
@@ -186,6 +188,21 @@ define(
return SIGNED_FLAG;
};
+ this.checkMixnet = function(mail) {
+
+ var MIXNET_FLAG = {
+ cssClass: 'security-status__label--mixnet',
+ label: 'mixnet',
+ tooltipText: 'mixnet-label-tooltip'
+ };
+
+ if(_.any(mail.security_casing.mixnet, function(mixnet) { return mixnet.state === 'valid'; })) {
+ return MIXNET_FLAG;
+ }
+
+ return null;
+ };
+
this.isNotTrusted = function(mail){
return _.any(mail.security_casing.imprints, function(imprint) {
if(_.isNull(imprint.seal)){
diff --git a/web-ui/app/locales/en_US/translation.json b/web-ui/app/locales/en_US/translation.json
index 6ca72283..66b9e01e 100644
--- a/web-ui/app/locales/en_US/translation.json
+++ b/web-ui/app/locales/en_US/translation.json
@@ -43,6 +43,7 @@
"not-encrypted-label-tooltip": "This message is not encrypted.",
"not-signed-label-tooltip": "The sender could not be verified.",
"signed-label-tooltip": "You are communicating with the real sender.",
+ "mixnet-label-tooltip": "This message was sent using panoramix mixnet.",
"sending-mail": "Sending...",
"mail-sent": "Your message was sent!",
"mail-not-sent": "Error, message not sent:",
diff --git a/web-ui/app/scss/views/_security-labels.scss b/web-ui/app/scss/views/_security-labels.scss
index 5319eb1d..5ccf613e 100644
--- a/web-ui/app/scss/views/_security-labels.scss
+++ b/web-ui/app/scss/views/_security-labels.scss
@@ -71,5 +71,11 @@
content: "\f05e";
}
}
+
+ &--mixnet {
+ &:before {
+ content: "\f023";
+ }
+ }
}
}
diff --git a/web-ui/app/templates/mails/full_view.hbs b/web-ui/app/templates/mails/full_view.hbs
index 0068b7f7..98d5551a 100644
--- a/web-ui/app/templates/mails/full_view.hbs
+++ b/web-ui/app/templates/mails/full_view.hbs
@@ -17,6 +17,11 @@
{{t encryptionStatus.label }}
</span>
{{/if}}
+ {{#if mixnetStatus}}
+ <span class="security-status__label {{ mixnetStatus.cssClass }}" data-label="{{t mixnetStatus.tooltipText }}">
+ {{t mixnetStatus.label }}
+ </span>
+ {{/if}}
</div>
<div class="mail-read-view__header-recipients">