mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Improve Settings handling
This commit is contained in:
parent
e7b1ce7509
commit
34b25eedea
39 changed files with 160 additions and 150 deletions
|
|
@ -8,6 +8,7 @@ export const $htmlCL = doc.documentElement.classList;
|
|||
export const elementById = id => doc.getElementById(id);
|
||||
|
||||
export const Settings = rl.settings;
|
||||
export const SettingsGet = rl.settings.get;
|
||||
|
||||
export const dropdownVisibility = ko.observable(false).extend({ rateLimit: 0 });
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { pString, pInt } from 'Common/Utils';
|
||||
import { Settings } from 'Common/Globals';
|
||||
import { Settings, SettingsGet } from 'Common/Globals';
|
||||
|
||||
const
|
||||
ROOT = './',
|
||||
|
|
@ -8,7 +8,7 @@ const
|
|||
VERSION = Settings.app('version'),
|
||||
VERSION_PREFIX = Settings.app('webVersionPath') || 'snappymail/v/' + VERSION + '/',
|
||||
|
||||
getHash = () => Settings.get('AuthAccountHash') || '0';
|
||||
getHash = () => SettingsGet('AuthAccountHash') || '0';
|
||||
|
||||
/**
|
||||
* @returns {string}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import { settingsAddViewModel } from 'Screen/AbstractSettings';
|
||||
import { SettingsGet } from 'Common/Globals';
|
||||
|
||||
const USER_VIEW_MODELS_HOOKS = [],
|
||||
ADMIN_VIEW_MODELS_HOOKS = [];
|
||||
|
|
@ -48,7 +49,7 @@ export function runSettingsViewModelHooks(admin) {
|
|||
* @returns {?}
|
||||
*/
|
||||
rl.pluginSettingsGet = (pluginSection, name) => {
|
||||
let plugins = rl.settings.get('Plugins');
|
||||
let plugins = SettingsGet('Plugins');
|
||||
plugins = plugins && null != plugins[pluginSection] ? plugins[pluginSection] : null;
|
||||
return plugins ? (null == plugins[name] ? null : plugins[name]) : null;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -504,5 +504,5 @@ export function mailToHelper(mailToUrl) {
|
|||
|
||||
export function showMessageComposer(params = [])
|
||||
{
|
||||
rl.app.showScreenPopup(params);
|
||||
rl.app.showMessageComposer(params);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue