mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 21:19:21 +03:00
Use less jQuery, more native
This commit is contained in:
parent
24cb874c87
commit
bdb36ec128
35 changed files with 492 additions and 779 deletions
|
|
@ -2,7 +2,6 @@ import ko from 'ko';
|
|||
|
||||
import { MESSAGES_PER_PAGE, MESSAGES_PER_PAGE_VALUES } from 'Common/Consts';
|
||||
import { Layout, EditorDefaultType } from 'Common/Enums';
|
||||
import { $htmlCL } from 'Common/Globals';
|
||||
import { pInt } from 'Common/Utils';
|
||||
|
||||
import * as Settings from 'Storage/Settings';
|
||||
|
|
@ -43,10 +42,11 @@ class SettingsUserStore {
|
|||
}
|
||||
|
||||
subscribers() {
|
||||
this.layout.subscribe((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);
|
||||
const htmlCL = document.documentElement.classList;
|
||||
this.layout.subscribe(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