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

43 lines
927 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 MessageStore from 'Stores/User/Message';
import { ThemeStore } from 'Stores/Theme';
import { AbstractViewRight } from 'Knoin/AbstractViews';
export class PaneSettingsUserView extends AbstractViewRight {
constructor() {
super('User/Settings/Pane', 'SettingsPane');
2016-05-01 09:07:10 +08:00
this.leftPanelDisabled = leftPanelDisabled;
}
2016-05-01 09:07:10 +08:00
onShow() {
MessageStore.message(null);
}
hideLeft(item, event) {
event.preventDefault();
event.stopPropagation();
leftPanelDisabled(true);
}
showLeft(item, event) {
event.preventDefault();
event.stopPropagation();
2016-05-01 09:07:10 +08:00
leftPanelDisabled(false);
}
2016-05-01 09:07:10 +08:00
onBuild(dom) {
dom.addEventListener('click', () => ThemeStore.isMobile() && leftPanelDisabled(true));
2016-06-30 08:02:45 +08:00
}
backToMailBoxClick() {
rl.route.setHash(mailbox(getFolderInboxName()));
}
}