mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +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())
|
||||
&& !MessagelistUserStore.isDraftFolder(),
|
||||
|
||||
spamAllowed: () => !(UNUSED_OPTION_VALUE === FolderUserStore.spamFolder()
|
||||
canMarkAsSpam: () => !(UNUSED_OPTION_VALUE === FolderUserStore.spamFolder()
|
||||
// | MessagelistUserStore.isArchiveFolder()
|
||||
| MessagelistUserStore.isSentFolder()
|
||||
| MessagelistUserStore.isDraftFolder()),
|
||||
|
||||
isSpamAllowed: () => MessagelistUserStore.spamAllowed() && !MessagelistUserStore.isSpamFolder(),
|
||||
|
||||
isUnSpamAllowed: () => MessagelistUserStore.spamAllowed() && MessagelistUserStore.isSpamFolder(),
|
||||
| MessagelistUserStore.isDraftFolder()
|
||||
| MessagelistUserStore.isSpamFolder()),
|
||||
|
||||
pageCount: () => Math.max(1, Math.ceil(MessagelistUserStore.count() / SettingsUserStore.messagesPerPage())),
|
||||
|
||||
|
|
|
|||
|
|
@ -67,8 +67,8 @@ export class MailMessageList extends AbstractViewRight {
|
|||
|
||||
this.messageList = MessagelistUserStore;
|
||||
this.archiveAllowed = MessagelistUserStore.archiveAllowed;
|
||||
this.isSpamAllowed = MessagelistUserStore.isSpamAllowed;
|
||||
this.isUnSpamAllowed = MessagelistUserStore.isUnSpamAllowed;
|
||||
this.canMarkAsSpam = MessagelistUserStore.canMarkAsSpam;
|
||||
this.isSpamFolder = MessagelistUserStore.isSpamFolder;
|
||||
|
||||
this.composeInEdit = AppUserStore.composeInEdit;
|
||||
|
||||
|
|
|
|||
|
|
@ -112,10 +112,10 @@ export class MailMessageView extends AbstractViewRight {
|
|||
this.attachmentsActions = ko.observableArray(arrayLength(attachmentsActions) ? attachmentsActions : []);
|
||||
|
||||
this.hasCheckedMessages = MessagelistUserStore.hasCheckedMessages;
|
||||
this.isDraftFolder = MessagelistUserStore.isDraftFolder;
|
||||
this.archiveAllowed = MessagelistUserStore.archiveAllowed;
|
||||
this.isSpamAllowed = MessagelistUserStore.isSpamAllowed;
|
||||
this.isUnSpamAllowed = MessagelistUserStore.isUnSpamAllowed;
|
||||
this.canMarkAsSpam = MessagelistUserStore.canMarkAsSpam;
|
||||
this.isDraftFolder = MessagelistUserStore.isDraftFolder;
|
||||
this.isSpamFolder = MessagelistUserStore.isSpamFolder;
|
||||
|
||||
this.message = MessageUserStore.message;
|
||||
this.messageLoadingThrottle = MessageUserStore.loading;
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@
|
|||
<!-- /ko -->
|
||||
<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: isSpamAllowed, 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 fontastic" data-bind="visible: canMarkAsSpam, command: spamCommand" data-i18n="[title]GLOBAL/SPAM">⚠</a>
|
||||
<a class="btn" data-bind="visible: isSpamFolder, command: notSpamCommand" data-i18n="[title]GLOBAL/NOT_SPAM">
|
||||
<i class="icon-check-mark-circle-two"></i>
|
||||
</a>
|
||||
<a class="btn fontastic" data-bind="command: deleteCommand" data-i18n="[title]GLOBAL/DELETE">🗑</a>
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@
|
|||
</div>
|
||||
<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: isSpamAllowed , 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 fontastic" data-bind="visible: canMarkAsSpam , command: spamCommand" data-i18n="[title]GLOBAL/SPAM">⚠</a>
|
||||
<a class="btn" data-bind="visible: isSpamFolder, command: notSpamCommand" data-i18n="[title]GLOBAL/NOT_SPAM">
|
||||
<i class="icon-check-mark-circle-two"></i>
|
||||
</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">
|
||||
<a href="#" tabindex="-1" data-bind="command: archiveCommand" data-icon="🗄" data-i18n="GLOBAL/TO_ARCHIVE"></a>
|
||||
</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>
|
||||
</li>
|
||||
<li role="presentation" data-bind="visible: isUnSpamAllowed">
|
||||
<li role="presentation" data-bind="visible: isSpamFolder">
|
||||
<a href="#" tabindex="-1" data-bind="command: notSpamCommand">
|
||||
<i class="icon-check-mark-circle-two"></i>
|
||||
<span data-i18n="GLOBAL/NOT_SPAM"></span>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue