mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-15 12:15:20 +08:00
aeb5275648
Put dev/Storage/Settings.js in boots.js global rl.settings
23 lines
609 B
JavaScript
23 lines
609 B
JavaScript
import ko from 'ko';
|
|
|
|
class ThemeStore {
|
|
constructor() {
|
|
this.themes = ko.observableArray([]);
|
|
this.themeBackgroundName = ko.observable('');
|
|
this.themeBackgroundHash = ko.observable('');
|
|
|
|
this.theme = ko.observable('').extend({ limitedList: this.themes });
|
|
}
|
|
|
|
populate() {
|
|
const Settings = rl.settings,
|
|
themes = Settings.app('themes');
|
|
|
|
this.themes(Array.isArray(themes) ? themes : []);
|
|
this.theme(Settings.get('Theme'));
|
|
this.themeBackgroundName(Settings.get('UserBackgroundName'));
|
|
this.themeBackgroundHash(Settings.get('UserBackgroundHash'));
|
|
}
|
|
}
|
|
|
|
export default new ThemeStore();
|