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

32 lines
792 B
JavaScript
Raw Normal View History

import { mailbox } from 'Common/Links';
2019-07-05 03:19:24 +08:00
import { getFolderInboxName } from 'Common/Cache';
import { leftPanelDisabled } from 'Common/Globals';
import { MessageUserStore } from 'Stores/User/Message';
import { ThemeStore } from 'Stores/Theme';
import { AbstractViewRight } from 'Knoin/AbstractViews';
export class PaneSettingsUserView extends AbstractViewRight {
constructor() {
super('SettingsPane');
2016-05-01 09:07:10 +08:00
this.isMobile = ThemeStore.isMobile;
this.leftPanelDisabled = leftPanelDisabled;
}
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
}
backToMailBoxClick() {
rl.route.setHash(mailbox(getFolderInboxName()));
}
}