mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-10 00:38:04 +08:00
36 lines
789 B
JavaScript
36 lines
789 B
JavaScript
import { leftPanelDisabled } from 'Common/Globals';
|
|
import { settings, mailbox } from 'Common/Links';
|
|
import { getFolderInboxName } from 'Common/Cache';
|
|
|
|
import { AbstractViewLeft } from 'Knoin/AbstractViews';
|
|
|
|
import { ThemeStore } from 'Stores/Theme';
|
|
|
|
export class MenuSettingsUserView extends AbstractViewLeft {
|
|
/**
|
|
* @param {Object} screen
|
|
*/
|
|
constructor(screen) {
|
|
super('SettingsMenu');
|
|
|
|
this.leftPanelDisabled = leftPanelDisabled;
|
|
|
|
this.menu = screen.menu;
|
|
}
|
|
|
|
onBuild(dom) {
|
|
dom.addEventListener('click', event =>
|
|
ThemeStore.isMobile()
|
|
&& event.target.closestWithin('.b-settins-left nav a', dom)
|
|
&& leftPanelDisabled(true)
|
|
);
|
|
}
|
|
|
|
link(route) {
|
|
return settings(route);
|
|
}
|
|
|
|
backToMailBoxClick() {
|
|
rl.route.setHash(mailbox(getFolderInboxName()));
|
|
}
|
|
}
|