summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--service/app/pixelated_user_agent.py3
-rw-r--r--web-ui/app/js/mail_view/ui/mail_view.js15
-rw-r--r--web-ui/app/js/services/mail_service.js9
-rw-r--r--web-ui/app/js/tags/data/tags.js4
-rw-r--r--web-ui/app/templates/mails/full_view.hbs4
5 files changed, 25 insertions, 10 deletions
diff --git a/service/app/pixelated_user_agent.py b/service/app/pixelated_user_agent.py
index 75d202ee..42c16262 100644
--- a/service/app/pixelated_user_agent.py
+++ b/service/app/pixelated_user_agent.py
@@ -28,7 +28,8 @@ def disabled_features():
'saveDraft',
'createNewTag',
'replySection',
- 'removeTag',
+ 'tags',
+ 'signatureStatus',
'encryptionStatus',
'contacts'
])
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 9114fa2e..33eb71d9 100644
--- a/web-ui/app/js/mail_view/ui/mail_view.js
+++ b/web-ui/app/js/mail_view/ui/mail_view.js
@@ -61,8 +61,12 @@ define(
data.mail.header.formattedDate = viewHelpers.getFormattedDate(date);
data.mail.security_casing = data.mail.security_casing || {};
- var signed = this.checkSigned(data.mail);
- var encrypted = this.checkEncrypted(data.mail);
+ if(features.isEnabled('signatureStatus')) {
+ var signed = this.checkSigned(data.mail);
+ }
+ if(features.isEnabled('encryptionStatus')) {
+ var encrypted = this.checkEncrypted(data.mail);
+ }
this.$node.html(templates.mails.fullView({
header: data.mail.header,
@@ -71,7 +75,8 @@ define(
ident: data.mail.ident,
tags: data.mail.tags,
encryptionStatus: encrypted,
- signatureStatus: signed
+ signatureStatus: signed,
+ features: features
}));
this.$node.find('.bodyArea').html(viewHelpers.formatMailBody(data.mail));
@@ -79,7 +84,9 @@ define(
this.trigger(document, events.search.highlightResults, {where: '.subjectArea'});
this.trigger(document, events.search.highlightResults, {where: '.msg-header .recipients'});
- this.attachTagCompletion();
+ if(features.isEnabled('tags')) {
+ this.attachTagCompletion();
+ }
this.select('tags').on('click', function (event) {
this.removeTag($(event.target).data('tag'));
diff --git a/web-ui/app/js/services/mail_service.js b/web-ui/app/js/services/mail_service.js
index 86642f37..b23d569a 100644
--- a/web-ui/app/js/services/mail_service.js
+++ b/web-ui/app/js/services/mail_service.js
@@ -6,8 +6,9 @@ define(
'flight/lib/component',
'views/i18n',
'services/model/mail',
- 'page/events'
- ], function (defineComponent, i18n, Mail, events) {
+ 'page/events',
+ 'features'
+ ], function (defineComponent, i18n, Mail, events, features) {
'use strict';
@@ -238,7 +239,9 @@ define(
this.on(events.mail.want, this.fetchSingle);
this.on(document, events.mail.read, this.readMail);
this.on(document, events.mail.unread, this.unreadMail);
- this.on(document, events.mail.tags.update, this.updateTags);
+ if(features.isEnabled('tags')) {
+ this.on(document, events.mail.tags.update, this.updateTags);
+ }
this.on(document, events.mail.delete, this.deleteMail);
this.on(document, events.mail.deleteMany, this.deleteManyMails);
this.on(document, events.search.perform, this.newSearch);
diff --git a/web-ui/app/js/tags/data/tags.js b/web-ui/app/js/tags/data/tags.js
index 96f08b99..dba5c26f 100644
--- a/web-ui/app/js/tags/data/tags.js
+++ b/web-ui/app/js/tags/data/tags.js
@@ -1,7 +1,7 @@
-define(['flight/lib/component', 'page/events'], function (defineComponent, events) {
+define(['flight/lib/component', 'page/events', 'mixins/with_feature_toggle'], function (defineComponent, events, withFeatureToggle) {
'use strict';
- var DataTags = defineComponent(dataTags);
+ var DataTags = defineComponent(dataTags, withFeatureToggle('tags'));
DataTags.all = {
name: 'all',
diff --git a/web-ui/app/templates/mails/full_view.hbs b/web-ui/app/templates/mails/full_view.hbs
index a466308d..c674291c 100644
--- a/web-ui/app/templates/mails/full_view.hbs
+++ b/web-ui/app/templates/mails/full_view.hbs
@@ -11,12 +11,16 @@
<div style="display:inline-block;padding-top: 5px;width:95%;flex-shrink:1" >
<div class="column large-10 no-padding security-status">
+ {{#if signatureStatus}}
<span class="{{signatureStatus}}">
{{t signatureStatus }}
</span>
+ {{/if}}
+ {{#if encryptionStatus}}
<span class="{{encryptionStatus}}">
{{t encryptionStatus }}
</span>
+ {{/if}}
</div>
<div class="column large-2 no-padding text-right">
<span class="received-date">{{ header.formattedDate }}</span>