mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Rename isSpamAllowed to logical canMarkAsSpam
This commit is contained in:
parent
2a92122dad
commit
7df534b4b5
5 changed files with 14 additions and 17 deletions
|
|
@ -83,14 +83,11 @@ addComputablesTo(MessagelistUserStore, {
|
||||||
archiveAllowed: () => ![UNUSED_OPTION_VALUE, MessagelistUserStore().Folder].includes(FolderUserStore.archiveFolder())
|
archiveAllowed: () => ![UNUSED_OPTION_VALUE, MessagelistUserStore().Folder].includes(FolderUserStore.archiveFolder())
|
||||||
&& !MessagelistUserStore.isDraftFolder(),
|
&& !MessagelistUserStore.isDraftFolder(),
|
||||||
|
|
||||||
spamAllowed: () => !(UNUSED_OPTION_VALUE === FolderUserStore.spamFolder()
|
canMarkAsSpam: () => !(UNUSED_OPTION_VALUE === FolderUserStore.spamFolder()
|
||||||
// | MessagelistUserStore.isArchiveFolder()
|
// | MessagelistUserStore.isArchiveFolder()
|
||||||
| MessagelistUserStore.isSentFolder()
|
| MessagelistUserStore.isSentFolder()
|
||||||
| MessagelistUserStore.isDraftFolder()),
|
| MessagelistUserStore.isDraftFolder()
|
||||||
|
| MessagelistUserStore.isSpamFolder()),
|
||||||
isSpamAllowed: () => MessagelistUserStore.spamAllowed() && !MessagelistUserStore.isSpamFolder(),
|
|
||||||
|
|
||||||
isUnSpamAllowed: () => MessagelistUserStore.spamAllowed() && MessagelistUserStore.isSpamFolder(),
|
|
||||||
|
|
||||||
pageCount: () => Math.max(1, Math.ceil(MessagelistUserStore.count() / SettingsUserStore.messagesPerPage())),
|
pageCount: () => Math.max(1, Math.ceil(MessagelistUserStore.count() / SettingsUserStore.messagesPerPage())),
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,8 +67,8 @@ export class MailMessageList extends AbstractViewRight {
|
||||||
|
|
||||||
this.messageList = MessagelistUserStore;
|
this.messageList = MessagelistUserStore;
|
||||||
this.archiveAllowed = MessagelistUserStore.archiveAllowed;
|
this.archiveAllowed = MessagelistUserStore.archiveAllowed;
|
||||||
this.isSpamAllowed = MessagelistUserStore.isSpamAllowed;
|
this.canMarkAsSpam = MessagelistUserStore.canMarkAsSpam;
|
||||||
this.isUnSpamAllowed = MessagelistUserStore.isUnSpamAllowed;
|
this.isSpamFolder = MessagelistUserStore.isSpamFolder;
|
||||||
|
|
||||||
this.composeInEdit = AppUserStore.composeInEdit;
|
this.composeInEdit = AppUserStore.composeInEdit;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -112,10 +112,10 @@ export class MailMessageView extends AbstractViewRight {
|
||||||
this.attachmentsActions = ko.observableArray(arrayLength(attachmentsActions) ? attachmentsActions : []);
|
this.attachmentsActions = ko.observableArray(arrayLength(attachmentsActions) ? attachmentsActions : []);
|
||||||
|
|
||||||
this.hasCheckedMessages = MessagelistUserStore.hasCheckedMessages;
|
this.hasCheckedMessages = MessagelistUserStore.hasCheckedMessages;
|
||||||
this.isDraftFolder = MessagelistUserStore.isDraftFolder;
|
|
||||||
this.archiveAllowed = MessagelistUserStore.archiveAllowed;
|
this.archiveAllowed = MessagelistUserStore.archiveAllowed;
|
||||||
this.isSpamAllowed = MessagelistUserStore.isSpamAllowed;
|
this.canMarkAsSpam = MessagelistUserStore.canMarkAsSpam;
|
||||||
this.isUnSpamAllowed = MessagelistUserStore.isUnSpamAllowed;
|
this.isDraftFolder = MessagelistUserStore.isDraftFolder;
|
||||||
|
this.isSpamFolder = MessagelistUserStore.isSpamFolder;
|
||||||
|
|
||||||
this.message = MessageUserStore.message;
|
this.message = MessageUserStore.message;
|
||||||
this.messageLoadingThrottle = MessageUserStore.loading;
|
this.messageLoadingThrottle = MessageUserStore.loading;
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,8 @@
|
||||||
<!-- /ko -->
|
<!-- /ko -->
|
||||||
<div class="btn-group" data-bind="visible: mobileCheckedStateShow()">
|
<div class="btn-group" data-bind="visible: mobileCheckedStateShow()">
|
||||||
<a class="btn fontastic" data-bind="visible: archiveAllowed, command: archiveCommand" data-i18n="[title]GLOBAL/TO_ARCHIVE">🗄</a>
|
<a class="btn fontastic" data-bind="visible: archiveAllowed, command: archiveCommand" data-i18n="[title]GLOBAL/TO_ARCHIVE">🗄</a>
|
||||||
<a class="btn fontastic" data-bind="visible: isSpamAllowed, command: spamCommand" data-i18n="[title]GLOBAL/SPAM">⚠</a>
|
<a class="btn fontastic" data-bind="visible: canMarkAsSpam, command: spamCommand" data-i18n="[title]GLOBAL/SPAM">⚠</a>
|
||||||
<a class="btn" data-bind="visible: isUnSpamAllowed, command: notSpamCommand" data-i18n="[title]GLOBAL/NOT_SPAM">
|
<a class="btn" data-bind="visible: isSpamFolder, command: notSpamCommand" data-i18n="[title]GLOBAL/NOT_SPAM">
|
||||||
<i class="icon-check-mark-circle-two"></i>
|
<i class="icon-check-mark-circle-two"></i>
|
||||||
</a>
|
</a>
|
||||||
<a class="btn fontastic" data-bind="command: deleteCommand" data-i18n="[title]GLOBAL/DELETE">🗑</a>
|
<a class="btn fontastic" data-bind="command: deleteCommand" data-i18n="[title]GLOBAL/DELETE">🗑</a>
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="btn-group">
|
<div class="btn-group">
|
||||||
<a class="btn fontastic" data-bind="visible: archiveAllowed, command: archiveCommand" data-i18n="[title]GLOBAL/TO_ARCHIVE">🗄</a>
|
<a class="btn fontastic" data-bind="visible: archiveAllowed, command: archiveCommand" data-i18n="[title]GLOBAL/TO_ARCHIVE">🗄</a>
|
||||||
<a class="btn fontastic" data-bind="visible: isSpamAllowed , command: spamCommand" data-i18n="[title]GLOBAL/SPAM">⚠</a>
|
<a class="btn fontastic" data-bind="visible: canMarkAsSpam , command: spamCommand" data-i18n="[title]GLOBAL/SPAM">⚠</a>
|
||||||
<a class="btn" data-bind="visible: isUnSpamAllowed, command: notSpamCommand" data-i18n="[title]GLOBAL/NOT_SPAM">
|
<a class="btn" data-bind="visible: isSpamFolder, command: notSpamCommand" data-i18n="[title]GLOBAL/NOT_SPAM">
|
||||||
<i class="icon-check-mark-circle-two"></i>
|
<i class="icon-check-mark-circle-two"></i>
|
||||||
</a>
|
</a>
|
||||||
<a class="btn fontastic" data-bind="command: deleteCommand" data-i18n="[title]GLOBAL/DELETE">🗑</a>
|
<a class="btn fontastic" data-bind="command: deleteCommand" data-i18n="[title]GLOBAL/DELETE">🗑</a>
|
||||||
|
|
@ -68,10 +68,10 @@
|
||||||
<li role="presentation" data-bind="visible: archiveAllowed">
|
<li role="presentation" data-bind="visible: archiveAllowed">
|
||||||
<a href="#" tabindex="-1" data-bind="command: archiveCommand" data-icon="🗄" data-i18n="GLOBAL/TO_ARCHIVE"></a>
|
<a href="#" tabindex="-1" data-bind="command: archiveCommand" data-icon="🗄" data-i18n="GLOBAL/TO_ARCHIVE"></a>
|
||||||
</li>
|
</li>
|
||||||
<li role="presentation" data-bind="visible: isSpamAllowed">
|
<li role="presentation" data-bind="visible: canMarkAsSpam">
|
||||||
<a href="#" tabindex="-1" data-bind="command: spamCommand" data-icon="⚠" data-i18n="GLOBAL/SPAM"></a>
|
<a href="#" tabindex="-1" data-bind="command: spamCommand" data-icon="⚠" data-i18n="GLOBAL/SPAM"></a>
|
||||||
</li>
|
</li>
|
||||||
<li role="presentation" data-bind="visible: isUnSpamAllowed">
|
<li role="presentation" data-bind="visible: isSpamFolder">
|
||||||
<a href="#" tabindex="-1" data-bind="command: notSpamCommand">
|
<a href="#" tabindex="-1" data-bind="command: notSpamCommand">
|
||||||
<i class="icon-check-mark-circle-two"></i>
|
<i class="icon-check-mark-circle-two"></i>
|
||||||
<span data-i18n="GLOBAL/NOT_SPAM"></span>
|
<span data-i18n="GLOBAL/NOT_SPAM"></span>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue