mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Revamp Mobile/Desktop switcher without completely reloading.
Remove switcher from login page, it became useless.
This commit is contained in:
parent
292f3289ac
commit
d7994ddab6
35 changed files with 159 additions and 202 deletions
|
|
@ -1,5 +1,5 @@
|
|||
import ko from 'ko';
|
||||
import { isMobile } from 'Common/Globals';
|
||||
import { $htmlCL } from 'Common/Globals';
|
||||
|
||||
export const ThemeStore = {
|
||||
themes: ko.observableArray(),
|
||||
|
|
@ -12,7 +12,7 @@ export const ThemeStore = {
|
|||
|
||||
this.themes(Array.isArray(themes) ? themes : []);
|
||||
this.theme(Settings.get('Theme'));
|
||||
if (!isMobile()) {
|
||||
if (!this.isMobile()) {
|
||||
this.themeBackgroundName(Settings.get('UserBackgroundName'));
|
||||
this.themeBackgroundHash(Settings.get('UserBackgroundHash'));
|
||||
}
|
||||
|
|
@ -20,3 +20,6 @@ export const ThemeStore = {
|
|||
};
|
||||
|
||||
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