Skip to content

Commit

Permalink
Improve display of signed/encrypted message
Browse files Browse the repository at this point in the history
  • Loading branch information
cgx committed Jan 17, 2018
1 parent 4133a0b commit 5b711de
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 6 deletions.
2 changes: 2 additions & 0 deletions UI/Common/English.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@
"You cannot (un)subscribe to a folder that you own!" = "You cannot (un)subscribe to a folder that you own!";

/* SMIME Certificate field */
"Subject Name" = "Subject Name";
"Issuer" = "Issuer";
"countryName" = "Country";
"organizationName" = "Organization";
"organizationalUnitName" = "Organizational Unit";
Expand Down
3 changes: 3 additions & 0 deletions UI/MailerUI/English.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,9 @@
/* Number of selected messages in list */
"selected" = "selected";

/* Encrypted message notification */
"This message is encrypted" = "This message is encrypted";

/* OpenSSL certificate error - unknown issuer */
"certificate verify error" = "Unable to verify message signature";

Expand Down
18 changes: 15 additions & 3 deletions UI/Templates/MailerUI/UIxMailViewTemplate.wox
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@

<!-- S/MIME Signature -->
<sg-block-toggle class="sg-no-print" layout="column"
ng-show="::viewer.message.$smime.message">
ng-show="::viewer.message.$smime.certificate">
<md-divider><!-- divider --></md-divider>
<md-list-item class="sg-button-toggle">
<div>
Expand All @@ -225,14 +225,16 @@
<div class="md-margin" md-whiteframe="3">
<div class="md-padding" layout="row" layout-wrap="layout-wrap">
<div flex="50" flex-xs="100">
<h6 class="md-subhead md-default-theme md-fg md-primary">Subject Name</h6>
<h6 class="md-subhead md-default-theme md-fg md-primary"
ng-bind="::'Subject Name' | loc"><!-- Subject Name --></h6>
<div ng-repeat="field in ::viewer.message.$smime.certificate.subject">
<div class="pseudo-input-label" ng-bind="field[0] | loc"><!-- label --></div>
<div class="pseudo-input-field md-body-1" ng-bind="field[1]"><!-- value --></div>
</div>
</div>
<div flex="50" flex-xs="100">
<h6 class="md-subhead md-default-theme md-fg md-primary">Issuer</h6>
<h6 class="md-subhead md-default-theme md-fg md-primary"
ng-bind="::'Issuer' | loc"><!-- Issuer --></h6>
<div ng-repeat="field in ::viewer.message.$smime.certificate.issuer">
<div class="pseudo-input-label" ng-bind="field[0] | loc"><!-- label --></div>
<div class="pseudo-input-field md-body-1" ng-bind="field[1]"><!-- value --></div>
Expand All @@ -243,6 +245,16 @@
</div>
</sg-block-toggle>

<!-- S/MIME Encryption -->
<div class="sg-no-print" layout="column"
ng-show="viewer.message.$smime.isEncrypted">
<md-divider><!-- divider --></md-divider>
<div layout="row" layout-align="start center">
<md-icon>lock_outline</md-icon>
<p class="md-padding md-flex" ng-bind-html="::viewer.message.$smime.message"><!-- message --></p>
</div>
</div>

<!-- Load external images -->
<div class="sg-no-print" ng-show="viewer.message.$hasUnsafeContent">
<md-divider><!-- divider --></md-divider>
Expand Down
6 changes: 4 additions & 2 deletions UI/Templates/PreferencesUI/UIxAccountEditor.wox
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,16 @@
<div class="md-margin" md-whiteframe="3">
<div class="md-padding" layout="row" layout-wrap="layout-wrap">
<div flex="50" flex-xs="100">
<h6 class="md-subhead md-default-theme md-fg md-primary">Subject Name</h6>
<h6 class="md-subhead md-default-theme md-fg md-primary"
ng-bind="::'Subject Name' | loc"><!-- Subject Name --></h6>
<div ng-repeat="field in $AccountDialogController.certificate.subject">
<div class="pseudo-input-label" ng-bind="field[0] | loc"><!-- label --></div>
<div class="pseudo-input-field md-body-1" ng-bind="field[1]"><!-- value --></div>
</div>
</div>
<div flex="50" flex-xs="100">
<h6 class="md-subhead md-default-theme md-fg md-primary">Issuer</h6>
<h6 class="md-subhead md-default-theme md-fg md-primary"
ng-bind="::'Issuer' | loc"><!-- Issuer --></h6>
<div ng-repeat="field in $AccountDialogController.certificate.issuer">
<div class="pseudo-input-label" ng-bind="field[0] | loc"><!-- label --></div>
<div class="pseudo-input-field md-body-1" ng-bind="field[1]"><!-- value --></div>
Expand Down
3 changes: 2 additions & 1 deletion UI/WebServerResources/js/Mailer/Message.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,8 @@
}
else if (part.type == 'UIxMailPartEncryptedViewer') {
_this.$smime = {
message: "THIS MAIL IS ENCRYPTED!"
isEncrypted: true,
message: l("This message is encrypted")
};
}
_.forEach(part.content, function(mixedPart) {
Expand Down

0 comments on commit 5b711de

Please sign in to comment.