mirror of
https://github.com/moparisthebest/mail
synced 2024-08-13 16:43:47 -04:00
1d0526a6a0
* Remove recursive ng-includes/templates * Use DOMPurify to sanitize reader input * Remove ngSanitize * Wait to show signature error until body has been parsed * Fix scrollbar in iframe * Allow iframe scrolling on iOS * Move mail text body rendering to sandbox * Cleanup html files
88 lines
4.7 KiB
HTML
88 lines
4.7 KiB
HTML
<div class="view-read" ng-controller="ReadCtrl">
|
|
|
|
<div class="headers">
|
|
<div class="controls">
|
|
<button wo-touch="state.mailList.remove(state.mailList.selected)" class="btn-icon" title="Delete mail"></button>
|
|
<button class="btn-icon" title="Reply to" reply-selection></button>
|
|
<button wo-touch="state.writer.write()" class="btn-icon" title="New mail"></button>
|
|
</div><!--/.controls-->
|
|
|
|
<p class="subject" wo-touch="state.read.toggle(false)" data-icon="">{{state.mailList.selected.subject ? state.mailList.selected.subject : 'No subject'}}</p>
|
|
<p class="date">{{state.mailList.selected.sentDate | date:'EEEE, MMM d, yyyy h:mm a'}}</p>
|
|
<div class="mail-addresses">
|
|
<p>
|
|
<label>From:</label>
|
|
<span ng-repeat="u in state.mailList.selected.from">
|
|
<span class="label" ng-class="{'label-primary': u.secure === false, 'label-primary-click': u.secure === false}" data-icon-append="{{(u.secure === false) ? '' : ''}}" ng-mouseover="getKeyId(u.address)" wo-touch="invite(u)" popover="#fingerprint-info">{{u.name || u.address}}</span>
|
|
</span>
|
|
</p>
|
|
<p>
|
|
<label>To:</label>
|
|
<span ng-repeat="u in state.mailList.selected.to">
|
|
<span class="label" ng-class="{'label-primary': u.secure === false, 'label-primary-click': u.secure === false}" data-icon-append="{{(u.secure === false) ? '' : ''}}" ng-mouseover="getKeyId(u.address)" wo-touch="invite(u)" popover="#fingerprint-info">{{u.name || u.address}}</span>
|
|
</span>
|
|
</p>
|
|
<p ng-show="state.mailList.selected.cc && state.mailList.selected.cc.length > 0">
|
|
<label>Cc:</label>
|
|
<span ng-repeat="u in state.mailList.selected.cc">
|
|
<span class="label" ng-class="{'label-primary': u.secure === false, 'label-primary-click': u.secure === false}" data-icon-append="{{(u.secure === false) ? '' : ''}}" ng-mouseover="getKeyId(u.address)" wo-touch="invite(u)" popover="#fingerprint-info">{{u.name || u.address}}</span>
|
|
</span>
|
|
</p>
|
|
</div><!--/.mail-addresses-->
|
|
</div><!--/.headers-->
|
|
|
|
<div class="attachments-wrapper"
|
|
ng-switch="state.mailList.selected.attachments !== undefined && state.mailList.selected.attachments.length > 0">
|
|
<div class="attachments" ng-switch-when="true">
|
|
<span class="attachment"
|
|
ng-repeat="attachment in state.mailList.selected.attachments"
|
|
wo-touch="download(attachment)">
|
|
<span data-icon=""></span>
|
|
{{attachment.filename}}
|
|
</span><!--/.attachment-->
|
|
</div><!--/.attachments-->
|
|
<div ng-switch-default class="seperator-line"></div>
|
|
</div><!--/.attachments-wrapper-->
|
|
|
|
<!-- Show working spinner -->
|
|
<div class="working-wrapper"
|
|
ng-if="state.mailList.selected && state.mailList.selected.html === undefined && (state.mailList.selected.body === undefined || (state.mailList.selected.encrypted && !state.mailList.selected.decrypted))">
|
|
<div class="working">
|
|
<span class="spinner"></span>
|
|
<strong ng-bind="(state.mailList.selected.decryptingBody) ? 'Decrypting...' : 'Loading...' "></strong>
|
|
</div><!--/.working-->
|
|
</div><!--/.working-wrapper-->
|
|
|
|
<div class="signature-status"
|
|
ng-show="state.mailList.selected.body && state.mailList.selected.signed && !state.mailList.selected.signaturesValid">
|
|
<p>Invalid PGP signature. This message could have been tampered with.</p>
|
|
</div>
|
|
|
|
<div class="display-images">
|
|
<a ng-show="state.mailList.selected.html && showImageButton" href='#' wo-touch="displayImages(); $event.preventDefault()">Display images</a>
|
|
</div>
|
|
|
|
<!-- Render html body in sandboxed iframe -->
|
|
<div class="frame-wrapper"
|
|
ng-show="state.mailList.selected && (!state.mailList.selected.encrypted && state.mailList.selected.body) || (state.mailList.selected.encrypted && state.mailList.selected.decrypted)">
|
|
<iframe sandbox="allow-popups allow-scripts" src="tpl/read-sandbox.html"
|
|
frame-load>
|
|
</iframe>
|
|
</div><!--/.frame-wrapper-->
|
|
|
|
<!-- popovers -->
|
|
<div id="fingerprint-info" class="popover right" ng-controller="PopoverCtrl">
|
|
<div class="arrow"></div>
|
|
<div class="popover-content">{{keyId}}</div>
|
|
</div><!--/.popover-->
|
|
|
|
<div class="reply-selection popover bottom">
|
|
<div class="arrow"></div>
|
|
<ul class="popover-content">
|
|
<li><button data-icon="" wo-touch="state.writer.write(state.mailList.selected)">Reply</button></li>
|
|
<li><button data-icon="" wo-touch="state.writer.write(state.mailList.selected, true)">Reply All</button></li>
|
|
<li><button data-icon="" wo-touch="state.writer.write(state.mailList.selected, null, true)">Forward</button></li>
|
|
</ul>
|
|
</div><!--/.reply-selection-->
|
|
|
|
</div><!--/.view-read--> |