2019-07-05 03:19:24 +08:00
|
|
|
import { inbox } from 'Common/Links';
|
|
|
|
import { getFolderInboxName } from 'Common/Cache';
|
|
|
|
import { leftPanelDisabled } from 'Common/Globals';
|
2014-09-06 05:44:29 +08:00
|
|
|
|
2016-08-17 06:01:20 +08:00
|
|
|
import MessageStore from 'Stores/User/Message';
|
2014-09-06 05:44:29 +08:00
|
|
|
|
2021-01-24 17:25:23 +08:00
|
|
|
import { AbstractViewRight } from 'Knoin/AbstractViews';
|
|
|
|
|
|
|
|
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
|
|
|
|
2020-09-04 18:05:17 +08:00
|
|
|
this.mobile = rl.settings.app('mobile');
|
2014-09-06 05:44:29 +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() {
|
|
|
|
MessageStore.message(null);
|
|
|
|
}
|
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) {
|
2020-08-30 16:30:50 +08:00
|
|
|
this.mobile && dom.addEventListener('click', () => 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() {
|
2020-09-17 02:35:29 +08:00
|
|
|
rl.route.setHash(inbox(getFolderInboxName()));
|
2016-08-17 06:01:20 +08:00
|
|
|
}
|
|
|
|
}
|
2014-09-06 05:44:29 +08:00
|
|
|
|
2021-01-22 23:32:08 +08:00
|
|
|
export { PaneSettingsUserView };
|