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
|
|
|
|
2020-09-17 02:35:29 +08:00
|
|
|
import { view, ViewType } from 'Knoin/Knoin';
|
2019-07-05 03:19:24 +08:00
|
|
|
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
|
2016-05-01 09:07:10 +08:00
|
|
|
|
2016-08-17 06:01:20 +08:00
|
|
|
@view({
|
|
|
|
name: 'View/User/Settings/Pane',
|
|
|
|
type: ViewType.Right,
|
|
|
|
templateID: 'SettingsPane'
|
|
|
|
})
|
2019-07-05 03:19:24 +08:00
|
|
|
class PaneSettingsUserView extends AbstractViewNext {
|
2016-08-17 06:01:20 +08:00
|
|
|
constructor() {
|
|
|
|
super();
|
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
|
|
|
|
2019-07-05 03:19:24 +08:00
|
|
|
export { PaneSettingsUserView, PaneSettingsUserView as default };
|