mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-11 00:14:50 +03:00
Restructure Capa
This commit is contained in:
parent
5990addfef
commit
e7c7b8ed53
15 changed files with 74 additions and 140 deletions
|
|
@ -2,10 +2,7 @@ import ko from 'ko';
|
|||
|
||||
import { UNUSED_OPTION_VALUE } from 'Common/Consts';
|
||||
|
||||
import {
|
||||
Capa,
|
||||
Scope
|
||||
} from 'Common/Enums';
|
||||
import { Scope } from 'Common/Enums';
|
||||
|
||||
import {
|
||||
ComposeType,
|
||||
|
|
@ -93,7 +90,7 @@ export class MailMessageView extends AbstractViewRight {
|
|||
|
||||
this.moveAction = moveAction;
|
||||
|
||||
this.allowMessageActions = SettingsCapa(Capa.MessageActions);
|
||||
this.allowMessageActions = SettingsCapa('MessageActions');
|
||||
|
||||
const attachmentsActions = Settings.app('attachmentsActions');
|
||||
this.attachmentsActions = ko.observableArray(arrayLength(attachmentsActions) ? attachmentsActions : []);
|
||||
|
|
@ -132,7 +129,7 @@ export class MailMessageView extends AbstractViewRight {
|
|||
this.viewHash = '';
|
||||
|
||||
this.addComputables({
|
||||
allowAttachmentControls: () => this.attachmentsActions.length && SettingsCapa(Capa.AttachmentsActions),
|
||||
allowAttachmentControls: () => this.attachmentsActions.length && SettingsCapa('AttachmentsActions'),
|
||||
|
||||
downloadAsZipAllowed: () => this.attachmentsActions.includes('zip') && this.allowAttachmentControls(),
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue