Improve display of signed/encrypted message

This commit is contained in:
Francis Lachapelle
2018-01-17 11:17:22 -05:00
parent 4133a0b954
commit 5b711dea8f
5 changed files with 26 additions and 6 deletions

View File

@@ -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";

View File

@@ -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";

View File

@@ -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>
@@ -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>
@@ -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>

View File

@@ -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>

View File

@@ -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) {