mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 14:37:02 +03:00
Improved boot.js with existing global window.rl
Put dev/Storage/Settings.js in boots.js global rl.settings
This commit is contained in:
parent
f90dbcc84b
commit
aeb5275648
57 changed files with 284 additions and 380 deletions
|
|
@ -1,10 +1,8 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { appSettingsGet } from 'Storage/Settings';
|
||||
|
||||
class AboutAdminSettings {
|
||||
constructor() {
|
||||
this.version = ko.observable(appSettingsGet('version'));
|
||||
this.version = ko.observable(rl.settings.app('version'));
|
||||
this.coreType = ko.observable('djmaze');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,10 +4,9 @@ import { settingsSaveHelperSimpleFunction } from 'Common/Utils';
|
|||
|
||||
import Remote from 'Remote/Admin/Ajax';
|
||||
|
||||
import { settingsGet } from 'Storage/Settings';
|
||||
|
||||
class BrandingAdminSettings {
|
||||
constructor() {
|
||||
const settingsGet = rl.settings.get;
|
||||
this.title = ko.observable(settingsGet('Title')).idleTrigger();
|
||||
this.loadingDesc = ko.observable(settingsGet('LoadingDescription')).idleTrigger();
|
||||
this.faviconUrl = ko.observable(settingsGet('FaviconUrl')).idleTrigger();
|
||||
|
|
|
|||
|
|
@ -4,10 +4,11 @@ import { settingsSaveHelperSimpleFunction, defautOptionsAfterRender } from 'Comm
|
|||
|
||||
import { SaveSettingsStep, StorageResultType } from 'Common/Enums';
|
||||
import { i18n } from 'Common/Translator';
|
||||
import { settingsGet } from 'Storage/Settings';
|
||||
import Remote from 'Remote/Admin/Ajax';
|
||||
import { command } from 'Knoin/Knoin';
|
||||
|
||||
const settingsGet = rl.settings.get;
|
||||
|
||||
class ContactsAdminSettings {
|
||||
constructor() {
|
||||
this.defautOptionsAfterRender = defautOptionsAfterRender;
|
||||
|
|
|
|||
|
|
@ -11,7 +11,6 @@ import {
|
|||
import { SaveSettingsStep } from 'Common/Enums';
|
||||
import { reload as translatorReload } from 'Common/Translator';
|
||||
|
||||
import { settingsGet } from 'Storage/Settings';
|
||||
import { showScreenPopup } from 'Knoin/Knoin';
|
||||
|
||||
import Remote from 'Remote/Admin/Ajax';
|
||||
|
|
@ -21,6 +20,8 @@ import LanguageStore from 'Stores/Language';
|
|||
import AppAdminStore from 'Stores/Admin/App';
|
||||
import CapaAdminStore from 'Stores/Admin/Capa';
|
||||
|
||||
const settingsGet = rl.settings.get;
|
||||
|
||||
class GeneralAdminSettings {
|
||||
constructor() {
|
||||
this.language = LanguageStore.language;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { settingsSaveHelperSimpleFunction } from 'Common/Utils';
|
||||
import { settingsGet } from 'Storage/Settings';
|
||||
|
||||
import AppStore from 'Stores/Admin/App';
|
||||
|
||||
|
|
@ -12,7 +11,7 @@ class LoginAdminSettings {
|
|||
this.determineUserLanguage = AppStore.determineUserLanguage;
|
||||
this.determineUserDomain = AppStore.determineUserDomain;
|
||||
|
||||
this.defaultDomain = ko.observable(settingsGet('LoginDefaultDomain')).idleTrigger();
|
||||
this.defaultDomain = ko.observable(rl.settings.get('LoginDefaultDomain')).idleTrigger();
|
||||
this.allowLanguagesOnLogin = AppStore.allowLanguagesOnLogin;
|
||||
|
||||
this.dummy = ko.observable(false);
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ import ko from 'ko';
|
|||
import { StorageResultType, Notification } from 'Common/Enums';
|
||||
import { getNotification } from 'Common/Translator';
|
||||
|
||||
import { settingsGet } from 'Storage/Settings';
|
||||
import { showScreenPopup } from 'Knoin/Knoin';
|
||||
|
||||
import PluginStore from 'Stores/Admin/Plugin';
|
||||
|
|
@ -14,7 +13,7 @@ import { getApp } from 'Helper/Apps/Admin';
|
|||
|
||||
class PluginsAdminSettings {
|
||||
constructor() {
|
||||
this.enabledPlugins = ko.observable(!!settingsGet('EnabledPlugins'));
|
||||
this.enabledPlugins = ko.observable(!!rl.settings.get('EnabledPlugins'));
|
||||
|
||||
this.plugins = PluginStore.plugins;
|
||||
this.pluginsError = PluginStore.plugins.error;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@ import ko from 'ko';
|
|||
|
||||
import { StorageResultType } from 'Common/Enums';
|
||||
|
||||
import { settingsGet } from 'Storage/Settings';
|
||||
|
||||
import AppAdminStore from 'Stores/Admin/App';
|
||||
import CapaAdminStore from 'Stores/Admin/Capa';
|
||||
|
||||
|
|
@ -11,6 +9,8 @@ import Remote from 'Remote/Admin/Ajax';
|
|||
|
||||
import { command } from 'Knoin/Knoin';
|
||||
|
||||
const settingsGet = rl.settings.get;
|
||||
|
||||
class SecurityAdminSettings {
|
||||
constructor() {
|
||||
this.useLocalProxyForExternalImages = AppAdminStore.useLocalProxyForExternalImages;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue