snappymail/dev/View/User/Settings/Pane.js

26 lines
628 B
JavaScript
Raw Normal View History

import { leftPanelDisabled, toggleLeftPanel } from 'Common/Globals';
import { MessageUserStore } from 'Stores/User/Message';
import { ThemeStore } from 'Stores/Theme';
import { AbstractViewRight } from 'Knoin/AbstractViews';
2022-03-08 19:28:16 +08:00
export class SettingsPaneUserView extends AbstractViewRight {
constructor() {
2022-03-08 19:28:16 +08:00
super();
2016-05-01 09:07:10 +08:00
this.leftPanelDisabled = leftPanelDisabled;
this.toggleLeftPanel = toggleLeftPanel;
}
2016-05-01 09:07:10 +08:00
onShow() {
MessageUserStore.message(null);
}
onBuild(dom) {
dom.addEventListener('click', () =>
ThemeStore.isMobile() && !event.target.closestWithin('.toggleLeft', dom) && leftPanelDisabled(true)
);
2016-06-30 08:02:45 +08:00
}
}