mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-04 05:52:44 +08:00
19 lines
561 B
JavaScript
19 lines
561 B
JavaScript
import ko from 'ko';
|
|
|
|
export const ThemeStore = {
|
|
themes: ko.observableArray(),
|
|
themeBackgroundName: ko.observable(''),
|
|
themeBackgroundHash: ko.observable(''),
|
|
|
|
populate: function(){
|
|
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'));
|
|
}
|
|
};
|
|
|
|
ThemeStore.theme = ko.observable('').extend({ limitedList: ThemeStore.themes });
|