mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 06:27:02 +03:00
Bugfix: conflicting File object with native JS
Cleanup: Stores and tooltips
This commit is contained in:
parent
1df2e00862
commit
db0d03db83
43 changed files with 204 additions and 295 deletions
|
|
@ -3,8 +3,9 @@ import { $htmlCL } from 'Common/Globals';
|
|||
|
||||
export const ThemeStore = {
|
||||
themes: ko.observableArray(),
|
||||
themeBackgroundName: ko.observable(''),
|
||||
themeBackgroundHash: ko.observable(''),
|
||||
userBackgroundName: ko.observable(''),
|
||||
userBackgroundHash: ko.observable(''),
|
||||
isMobile: ko.observable($htmlCL.contains('rl-mobile')),
|
||||
|
||||
populate: function(){
|
||||
const Settings = rl.settings,
|
||||
|
|
@ -13,13 +14,12 @@ export const ThemeStore = {
|
|||
this.themes(Array.isArray(themes) ? themes : []);
|
||||
this.theme(Settings.get('Theme'));
|
||||
if (!this.isMobile()) {
|
||||
this.themeBackgroundName(Settings.get('UserBackgroundName'));
|
||||
this.themeBackgroundHash(Settings.get('UserBackgroundHash'));
|
||||
this.userBackgroundName(Settings.get('UserBackgroundName'));
|
||||
this.userBackgroundHash(Settings.get('UserBackgroundHash'));
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
ThemeStore.theme = ko.observable('').extend({ limitedList: ThemeStore.themes });
|
||||
|
||||
ThemeStore.isMobile = ko.observable($htmlCL.contains('rl-mobile'));
|
||||
ThemeStore.isMobile.subscribe(value => $htmlCL.toggle('rl-mobile', value));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue