mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Drop Capa enums
This commit is contained in:
parent
f44507a69b
commit
874f2592ca
14 changed files with 42 additions and 64 deletions
|
|
@ -7,7 +7,6 @@ import { IdentityUserStore } from 'Stores/User/Identity';
|
|||
|
||||
import { AbstractViewPopup } from 'Knoin/AbstractViews';
|
||||
|
||||
import { Capa } from 'Common/Enums';
|
||||
import { SettingsCapa } from 'Common/Globals';
|
||||
|
||||
export class OpenPgpGeneratePopupView extends AbstractViewPopup {
|
||||
|
|
@ -34,7 +33,7 @@ export class OpenPgpGeneratePopupView extends AbstractViewPopup {
|
|||
saveGnuPGPrivate: false
|
||||
});
|
||||
|
||||
this.canGnuPG = SettingsCapa(Capa.GnuPG);
|
||||
this.canGnuPG = SettingsCapa('GnuPG');
|
||||
|
||||
this.email.subscribe(() => this.emailError(false));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { Capa, Scope } from 'Common/Enums';
|
||||
import { Scope } from 'Common/Enums';
|
||||
|
||||
import { ComposeType, FolderType, MessageSetAction } from 'Common/EnumsUser';
|
||||
|
||||
|
|
@ -67,9 +67,9 @@ export class MailMessageList extends AbstractViewRight {
|
|||
|
||||
this.newMoveToFolder = !!SettingsGet('NewMoveToFolder');
|
||||
|
||||
this.allowSearch = SettingsCapa(Capa.Search);
|
||||
this.allowSearchAdv = SettingsCapa(Capa.SearchAdv);
|
||||
this.allowDangerousActions = SettingsCapa(Capa.DangerousActions);
|
||||
this.allowSearch = SettingsCapa('Search');
|
||||
this.allowSearchAdv = SettingsCapa('SearchAdv');
|
||||
this.allowDangerousActions = SettingsCapa('DangerousActions');
|
||||
|
||||
this.messageList = MessagelistUserStore;
|
||||
|
||||
|
|
@ -277,7 +277,7 @@ export class MailMessageList extends AbstractViewRight {
|
|||
}
|
||||
|
||||
clear() {
|
||||
if (SettingsCapa(Capa.DangerousActions)) {
|
||||
if (SettingsCapa('DangerousActions')) {
|
||||
showScreenPopup(FolderClearPopupView, [FolderUserStore.currentFolder()]);
|
||||
}
|
||||
}
|
||||
|
|
@ -296,7 +296,7 @@ export class MailMessageList extends AbstractViewRight {
|
|||
}
|
||||
|
||||
deleteWithoutMoveCommand() {
|
||||
if (SettingsCapa(Capa.DangerousActions)) {
|
||||
if (SettingsCapa('DangerousActions')) {
|
||||
rl.app.deleteMessagesFromFolder(
|
||||
FolderType.Trash,
|
||||
FolderUserStore.currentFolderFullName(),
|
||||
|
|
@ -787,7 +787,7 @@ export class MailMessageList extends AbstractViewRight {
|
|||
return false;
|
||||
});
|
||||
|
||||
if (SettingsCapa(Capa.Search)) {
|
||||
if (SettingsCapa('Search')) {
|
||||
// search input focus
|
||||
shortcuts.add('/', '', [Scope.MessageList, Scope.MessageView], () => {
|
||||
this.inputMessageListSearchFocus(true);
|
||||
|
|
@ -856,7 +856,7 @@ export class MailMessageList extends AbstractViewRight {
|
|||
}
|
||||
|
||||
advancedSearchClick() {
|
||||
SettingsCapa(Capa.SearchAdv)
|
||||
SettingsCapa('SearchAdv')
|
||||
&& showScreenPopup(AdvancedSearchPopupView, [MessagelistUserStore.mainSearch()]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ import { AccountUserStore } from 'Stores/User/Account';
|
|||
import { MessageUserStore } from 'Stores/User/Message';
|
||||
//import { FolderUserStore } from 'Stores/User/Folder';
|
||||
|
||||
import { Capa, Scope } from 'Common/Enums';
|
||||
import { Scope } from 'Common/Enums';
|
||||
import { settings } from 'Common/Links';
|
||||
|
||||
import { showScreenPopup } from 'Knoin/Knoin';
|
||||
|
|
@ -26,7 +26,7 @@ export class SystemDropDownUserView extends AbstractViewRight {
|
|||
constructor() {
|
||||
super('SystemDropDown');
|
||||
|
||||
this.allowAccounts = SettingsCapa(Capa.AdditionalAccounts);
|
||||
this.allowAccounts = SettingsCapa('AdditionalAccounts');
|
||||
|
||||
this.accountEmail = AccountUserStore.email;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue