2021-02-12 21:56:16 +08:00
|
|
|
import { mailbox } from 'Common/Links';
|
2019-07-05 03:19:24 +08:00
|
|
|
import { getFolderInboxName } from 'Common/Cache';
|
2021-02-17 03:12:23 +08:00
|
|
|
import { leftPanelDisabled } from 'Common/Globals';
|
2014-09-06 05:44:29 +08:00
|
|
|
|
2021-03-11 05:41:35 +08:00
|
|
|
import { MessageUserStore } from 'Stores/User/Message';
|
2021-02-17 03:12:23 +08:00
|
|
|
import { ThemeStore } from 'Stores/Theme';
|
2014-09-06 05:44:29 +08:00
|
|
|
|
2021-01-24 17:25:23 +08:00
|
|
|
import { AbstractViewRight } from 'Knoin/AbstractViews';
|
|
|
|
|
2021-02-12 21:56:16 +08:00
|
|
|
export class PaneSettingsUserView extends AbstractViewRight {
|
2016-08-17 06:01:20 +08:00
|
|
|
constructor() {
|
2021-01-24 17:25:23 +08:00
|
|
|
super('User/Settings/Pane', 'SettingsPane');
|
2016-05-01 09:07:10 +08:00
|
|
|
|
2016-08-17 06:01:20 +08:00
|
|
|
this.leftPanelDisabled = leftPanelDisabled;
|
|
|
|
}
|
2016-05-01 09:07:10 +08:00
|
|
|
|
2016-08-17 06:01:20 +08:00
|
|
|
onShow() {
|
2021-03-11 05:41:35 +08:00
|
|
|
MessageUserStore.message(null);
|
2016-08-17 06:01:20 +08:00
|
|
|
}
|
2014-09-06 05:44:29 +08:00
|
|
|
|
2016-09-03 07:19:37 +08:00
|
|
|
hideLeft(item, event) {
|
|
|
|
event.preventDefault();
|
|
|
|
event.stopPropagation();
|
2014-09-06 05:44:29 +08:00
|
|
|
|
2016-08-17 06:01:20 +08:00
|
|
|
leftPanelDisabled(true);
|
|
|
|
}
|
2014-09-06 05:44:29 +08:00
|
|
|
|
2016-09-03 07:19:37 +08:00
|
|
|
showLeft(item, event) {
|
|
|
|
event.preventDefault();
|
|
|
|
event.stopPropagation();
|
2016-05-01 09:07:10 +08:00
|
|
|
|
2016-08-17 06:01:20 +08:00
|
|
|
leftPanelDisabled(false);
|
|
|
|
}
|
2016-05-01 09:07:10 +08:00
|
|
|
|
2016-08-17 06:01:20 +08:00
|
|
|
onBuild(dom) {
|
2021-02-17 03:12:23 +08:00
|
|
|
dom.addEventListener('click', () => ThemeStore.isMobile() && leftPanelDisabled(true));
|
2016-06-30 08:02:45 +08:00
|
|
|
}
|
2014-09-06 05:44:29 +08:00
|
|
|
|
2016-08-17 06:01:20 +08:00
|
|
|
backToMailBoxClick() {
|
2021-02-12 21:56:16 +08:00
|
|
|
rl.route.setHash(mailbox(getFolderInboxName()));
|
2016-08-17 06:01:20 +08:00
|
|
|
}
|
|
|
|
}
|