mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 15:45:55 +08:00
Attachmnet => Attachment
This commit is contained in:
parent
e6290e06e9
commit
638128ff93
|
@ -124,7 +124,7 @@ export class MailMessageView extends AbstractViewRight {
|
|||
this.oMessageScrollerDom = null;
|
||||
|
||||
this.addObservables({
|
||||
showAttachmnetControls: false,
|
||||
showAttachmentControls: false,
|
||||
downloadAsZipLoading: false,
|
||||
lastReplyAction_: '',
|
||||
showFullInfo: '1' === Local.get(ClientSideKeyName.MessageHeaderFullInfo),
|
||||
|
@ -150,7 +150,7 @@ export class MailMessageView extends AbstractViewRight {
|
|||
this.messageListOfThreadsLoading = ko.observable(false).extend({ rateLimit: 1 });
|
||||
this.highlightUnselectedAttachments = ko.observable(false).extend({ falseTimeout: 2000 });
|
||||
|
||||
this.showAttachmnetControlsState = v => Local.set(ClientSideKeyName.MessageAttachmentControls, !!v);
|
||||
this.showAttachmentControlsState = v => Local.set(ClientSideKeyName.MessageAttachmentControls, !!v);
|
||||
|
||||
this.downloadAsZipError = ko.observable(false).extend({ falseTimeout: 7000 });
|
||||
|
||||
|
@ -198,9 +198,9 @@ export class MailMessageView extends AbstractViewRight {
|
|||
});
|
||||
|
||||
this.addComputables({
|
||||
allowAttachmnetControls: () => this.attachmentsActions.length && Settings.capa(Capa.AttachmentsActions),
|
||||
allowAttachmentControls: () => this.attachmentsActions.length && Settings.capa(Capa.AttachmentsActions),
|
||||
|
||||
downloadAsZipAllowed: () => this.attachmentsActions.includes('zip') && this.allowAttachmnetControls(),
|
||||
downloadAsZipAllowed: () => this.attachmentsActions.includes('zip') && this.allowAttachmentControls(),
|
||||
|
||||
lastReplyAction: {
|
||||
read: this.lastReplyAction_,
|
||||
|
@ -248,7 +248,7 @@ export class MailMessageView extends AbstractViewRight {
|
|||
});
|
||||
|
||||
this.addSubscribables({
|
||||
showAttachmnetControls: v => MessageUserStore.message()
|
||||
showAttachmentControls: v => MessageUserStore.message()
|
||||
&& MessageUserStore.message().attachments.forEach(item => item && item.checked(!!v)),
|
||||
|
||||
lastReplyAction_: value => Local.set(ClientSideKeyName.LastReplyAction, value),
|
||||
|
@ -257,10 +257,10 @@ export class MailMessageView extends AbstractViewRight {
|
|||
this.messageActiveDom(null);
|
||||
|
||||
if (message) {
|
||||
this.showAttachmnetControls(false);
|
||||
this.showAttachmentControls(false);
|
||||
if (Local.get(ClientSideKeyName.MessageAttachmentControls)) {
|
||||
setTimeout(() => {
|
||||
this.showAttachmnetControls(true);
|
||||
this.showAttachmentControls(true);
|
||||
}, 50);
|
||||
}
|
||||
|
||||
|
|
|
@ -253,7 +253,7 @@ trait Messages
|
|||
\fclose($rMessageStream);
|
||||
}
|
||||
|
||||
$this->deleteMessageAttachmnets($oAccount);
|
||||
$this->deleteMessageAttachments($oAccount);
|
||||
|
||||
$sDraftFolder = $this->GetActionParam('MessageFolder', '');
|
||||
$iDraftUid = (int) $this->GetActionParam('MessageUid', 0);
|
||||
|
@ -820,7 +820,7 @@ trait Messages
|
|||
return $this->TrueResponse($sResponseFunction);
|
||||
}
|
||||
|
||||
private function deleteMessageAttachmnets(Account $oAccount) : void
|
||||
private function deleteMessageAttachments(Account $oAccount) : void
|
||||
{
|
||||
$aAttachments = $this->GetActionParam('Attachments', null);
|
||||
|
||||
|
|
|
@ -274,7 +274,7 @@
|
|||
<span class="text" data-i18n="MESSAGE/BUTTON_NOTIFY_READ_RECEIPT"></span>
|
||||
</div>
|
||||
<div class="attachmentsPlace" data-bind="visible: message() && message().attachments().hasVisible(),
|
||||
css: {'selection-mode' : showAttachmnetControls, 'unselectedAttachmentsError': highlightUnselectedAttachments}">
|
||||
css: {'selection-mode' : showAttachmentControls, 'unselectedAttachmentsError': highlightUnselectedAttachments}">
|
||||
<ul class="attachmentList" data-bind="foreach: message() ? message().attachments() : []">
|
||||
<li class="attachmentItem" draggable="true"
|
||||
data-bind="visible: !isLinked, event: { 'dragstart': eventDragStart }, attr: { 'title': fileName }, css: {'checked': checked}">
|
||||
|
@ -301,11 +301,11 @@
|
|||
click: function () { checked(!checked()); return false }"></div>
|
||||
</li>
|
||||
</ul>
|
||||
<i class="fontastic controls-handle" data-bind="visible: allowAttachmnetControls() && !showAttachmnetControls(), click: function () { showAttachmnetControls(true); showAttachmnetControlsState(true); }">⚙</i>
|
||||
<i class="fontastic controls-handle" data-bind="visible: allowAttachmentControls() && !showAttachmentControls(), click: function () { showAttachmentControls(true); showAttachmentControlsState(true); }">⚙</i>
|
||||
</div>
|
||||
|
||||
<div class="attachmentsControls"
|
||||
data-bind="visible: showAttachmnetControls() && message() && message().attachments().hasVisible()">
|
||||
data-bind="visible: showAttachmentControls() && message() && message().attachments().hasVisible()">
|
||||
|
||||
<span data-bind="visible: downloadAsZipAllowed">
|
||||
<i class="fontastic iconcolor-red" data-bind="visible: downloadAsZipError">✖</i>
|
||||
|
@ -316,7 +316,7 @@
|
|||
</span>
|
||||
|
||||
<a href="#" class="close" style="margin-right: 5px;"
|
||||
data-bind="click: function () { showAttachmnetControls(false); showAttachmnetControlsState(false); }">×</a>
|
||||
data-bind="click: function () { showAttachmentControls(false); showAttachmentControlsState(false); }">×</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
Loading…
Reference in a new issue