Restructure Capa

This commit is contained in:
the-djmaze 2022-02-24 12:22:27 +01:00
parent 5990addfef
commit e7c7b8ed53
15 changed files with 74 additions and 140 deletions

View file

@ -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(),