mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 22:17:03 +03:00
Drop Capa enums
This commit is contained in:
parent
f44507a69b
commit
874f2592ca
14 changed files with 42 additions and 64 deletions
|
|
@ -1,4 +1,3 @@
|
|||
import { Scope } from 'Common/Enums';
|
||||
import { keyScope, leftPanelDisabled, SettingsGet, elementById } from 'Common/Globals';
|
||||
import { addObservablesTo } from 'External/ko';
|
||||
import { ThemeStore } from 'Stores/Theme';
|
||||
|
|
@ -8,7 +7,7 @@ export const AppUserStore = {
|
|||
};
|
||||
|
||||
addObservablesTo(AppUserStore, {
|
||||
focusedState: Scope.None,
|
||||
focusedState: 'none',
|
||||
|
||||
threadsAllowed: false,
|
||||
|
||||
|
|
@ -19,7 +18,7 @@ AppUserStore.focusedState.subscribe(value => {
|
|||
['FolderList','MessageList','MessageView'].forEach(name => {
|
||||
if (name === value) {
|
||||
keyScope(value);
|
||||
ThemeStore.isMobile() && leftPanelDisabled(Scope.FolderList !== value);
|
||||
ThemeStore.isMobile() && leftPanelDisabled('FolderList' !== value);
|
||||
}
|
||||
let dom = elementById('V-Mail'+name);
|
||||
dom && dom.classList.toggle('focused', name === value);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { Capa } from 'Common/Enums';
|
||||
import { SettingsCapa } from 'Common/Globals';
|
||||
|
||||
//import { EmailModel } from 'Model/Email';
|
||||
|
|
@ -102,7 +101,7 @@ export const GnuPGUserStore = new class {
|
|||
* @returns {boolean}
|
||||
*/
|
||||
isSupported() {
|
||||
return SettingsCapa(Capa.GnuPG);
|
||||
return SettingsCapa('GnuPG');
|
||||
}
|
||||
|
||||
importKey(key, callback) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import { Capa } from 'Common/Enums';
|
||||
import { doc, createElement, SettingsCapa, SettingsGet } from 'Common/Globals';
|
||||
import { staticLink } from 'Common/Links';
|
||||
|
||||
|
|
@ -22,7 +21,7 @@ export const
|
|||
}
|
||||
|
||||
init() {
|
||||
if (SettingsCapa(Capa.OpenPGP) && window.crypto && crypto.getRandomValues) {
|
||||
if (SettingsCapa('OpenPGP') && window.crypto && crypto.getRandomValues) {
|
||||
const script = createElement('script', {src:staticLink('js/min/openpgp.min.js')});
|
||||
script.onload = () => this.loadKeyrings();
|
||||
script.onerror = () => {
|
||||
|
|
@ -61,7 +60,7 @@ export const
|
|||
OpenPGPUserStore.loadKeyrings();
|
||||
}
|
||||
|
||||
if (SettingsCapa(Capa.GnuPG)) {
|
||||
if (SettingsCapa('GnuPG')) {
|
||||
GnuPGUserStore.loadKeyrings();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue