mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-02 22:17:03 +03:00
Improve and cleanup isMobile
This commit is contained in:
parent
10f9ce39d9
commit
b1c7bd2c50
15 changed files with 27 additions and 43 deletions
|
|
@ -42,9 +42,9 @@ class SettingsUserStore {
|
|||
subscribers() {
|
||||
const htmlCL = doc.documentElement.classList;
|
||||
this.layout.subscribe(value => {
|
||||
htmlCL.toggle('rl-no-preview-pane', isMobile() || Layout.NoPreview === value);
|
||||
htmlCL.toggle('rl-side-preview-pane', !isMobile() && Layout.SidePreview === value);
|
||||
htmlCL.toggle('rl-bottom-preview-pane', !isMobile() && Layout.BottomPreview === value);
|
||||
htmlCL.toggle('rl-no-preview-pane', Layout.NoPreview === value);
|
||||
htmlCL.toggle('rl-side-preview-pane', Layout.SidePreview === value);
|
||||
htmlCL.toggle('rl-bottom-preview-pane', Layout.BottomPreview === value);
|
||||
dispatchEvent(new CustomEvent('rl-layout', {detail:value}));
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue