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';
|
|
|
|
|
2022-03-08 19:28:16 +08:00
|
|
|
export class SettingsPaneUserView extends AbstractViewRight {
|
2016-08-17 06:01:20 +08:00
|
|
|
constructor() {
|
2022-03-08 19:28:16 +08:00
|
|
|
super();
|
2016-05-01 09:07:10 +08:00
|
|
|
|
2021-11-06 19:27:37 +08:00
|
|
|
this.isMobile = ThemeStore.isMobile;
|
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-08-17 06:01:20 +08:00
|
|
|
onBuild(dom) {
|
2021-11-06 19:27:37 +08:00
|
|
|
dom.addEventListener('click', () =>
|
|
|
|
ThemeStore.isMobile() && !event.target.closestWithin('.toggleLeft', dom) && leftPanelDisabled(true)
|
|
|
|
);
|
2016-06-30 08:02:45 +08:00
|
|
|
}
|
2014-09-06 05:44:29 +08:00
|
|
|
|
2022-05-01 03:26:34 +08:00
|
|
|
backToInbox() {
|
2022-03-03 23:28:05 +08:00
|
|
|
hasher.setHash(mailbox(getFolderInboxName()));
|
2016-08-17 06:01:20 +08:00
|
|
|
}
|
|
|
|
}
|