mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 13:39:22 +03:00
Split application data
This commit is contained in:
parent
3215c5f8d3
commit
1391648e1b
22 changed files with 186 additions and 130 deletions
|
|
@ -4,9 +4,17 @@ import Utils from 'Common/Utils';
|
|||
|
||||
class SettingsStorage
|
||||
{
|
||||
settings = {};
|
||||
appSettings = {};
|
||||
|
||||
constructor() {
|
||||
this.settings = window.rainloopAppData || {};
|
||||
this.settings = Utils.isNormal(this.settings) ? this.settings : {};
|
||||
|
||||
this.appSettings = Utils.getConfigurationFromScriptTag('application');
|
||||
this.appSettings = Utils.isNormal(this.appSettings) ? this.appSettings : {};
|
||||
|
||||
window.console.log(this.appSettings);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -25,6 +33,14 @@ class SettingsStorage
|
|||
this.settings[name] = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @return {*}
|
||||
*/
|
||||
appSettingsGet(name) {
|
||||
return Utils.isUnd(this.appSettings[name]) ? null : this.appSettings[name];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @return {boolean}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue