2014-09-06 05:44:29 +08:00
|
|
|
|
2016-08-17 06:01:20 +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 * as Settings from 'Storage/Settings';
|
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
|
|
|
|
2016-08-17 06:01:20 +08:00
|
|
|
import {view, ViewType, setHash} from 'Knoin/Knoin';
|
|
|
|
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'
|
|
|
|
})
|
|
|
|
class PaneSettingsUserView extends AbstractViewNext
|
2016-06-30 08:02:45 +08:00
|
|
|
{
|
2016-08-17 06:01:20 +08:00
|
|
|
constructor() {
|
|
|
|
super();
|
2016-05-01 09:07:10 +08:00
|
|
|
|
2016-08-17 06:01:20 +08:00
|
|
|
this.mobile = Settings.appSettingsGet('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-08-17 06:01:20 +08:00
|
|
|
hideLeft(oItem, oEvent) {
|
|
|
|
oEvent.preventDefault();
|
|
|
|
oEvent.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-08-17 06:01:20 +08:00
|
|
|
showLeft(oItem, oEvent) {
|
|
|
|
oEvent.preventDefault();
|
|
|
|
oEvent.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) {
|
|
|
|
if (this.mobile)
|
|
|
|
{
|
|
|
|
dom.on('click', () => {
|
|
|
|
leftPanelDisabled(true);
|
2016-06-30 08:02:45 +08:00
|
|
|
});
|
2016-08-17 06:01:20 +08:00
|
|
|
}
|
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() {
|
|
|
|
setHash(inbox(getFolderInboxName()));
|
|
|
|
}
|
|
|
|
}
|
2014-09-06 05:44:29 +08:00
|
|
|
|
2016-08-17 06:01:20 +08:00
|
|
|
export {PaneSettingsUserView, PaneSettingsUserView as default};
|