mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 21:49:21 +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,36 +0,0 @@
|
|||
let SETTINGS = RainLoop.data() || null;
|
||||
SETTINGS = null != SETTINGS ? SETTINGS : {};
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @returns {*}
|
||||
*/
|
||||
export function settingsGet(name) {
|
||||
return null == SETTINGS[name] ? null : SETTINGS[name];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @param {*} value
|
||||
*/
|
||||
export function settingsSet(name, value) {
|
||||
SETTINGS[name] = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @returns {*}
|
||||
*/
|
||||
export function appSettingsGet(name) {
|
||||
const APP_SETTINGS = SETTINGS.System || {};
|
||||
return null == APP_SETTINGS[name] ? null : APP_SETTINGS[name];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @returns {boolean}
|
||||
*/
|
||||
export function capa(name) {
|
||||
const values = SETTINGS.Capa;
|
||||
return Array.isArray(values) && null != name && values.includes(name);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue