snappymail/dev/View/User/Settings/Pane.js
djmaze d7994ddab6 Revamp Mobile/Desktop switcher without completely reloading.
Remove switcher from login page, it became useless.
2021-02-16 20:12:23 +01:00

42 lines
927 B
JavaScript

import { mailbox } from 'Common/Links';
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');
this.leftPanelDisabled = leftPanelDisabled;
}
onShow() {
MessageStore.message(null);
}
hideLeft(item, event) {
event.preventDefault();
event.stopPropagation();
leftPanelDisabled(true);
}
showLeft(item, event) {
event.preventDefault();
event.stopPropagation();
leftPanelDisabled(false);
}
onBuild(dom) {
dom.addEventListener('click', () => ThemeStore.isMobile() && leftPanelDisabled(true));
}
backToMailBoxClick() {
rl.route.setHash(mailbox(getFolderInboxName()));
}
}