mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-15 20:24:51 +08:00
17669b7be0
Signature plugin fixes Add view decorator A large number of fixes
60 lines
1.1 KiB
JavaScript
60 lines
1.1 KiB
JavaScript
|
|
import {inbox} from 'Common/Links';
|
|
import {getFolderInboxName} from 'Common/Cache';
|
|
import {leftPanelDisabled} from 'Common/Globals';
|
|
|
|
import * as Settings from 'Storage/Settings';
|
|
|
|
import MessageStore from 'Stores/User/Message';
|
|
|
|
import {view, ViewType, setHash} from 'Knoin/Knoin';
|
|
import {AbstractViewNext} from 'Knoin/AbstractViewNext';
|
|
|
|
@view({
|
|
name: 'View/User/Settings/Pane',
|
|
type: ViewType.Right,
|
|
templateID: 'SettingsPane'
|
|
})
|
|
class PaneSettingsUserView extends AbstractViewNext
|
|
{
|
|
constructor() {
|
|
super();
|
|
|
|
this.mobile = Settings.appSettingsGet('mobile');
|
|
|
|
this.leftPanelDisabled = leftPanelDisabled;
|
|
}
|
|
|
|
onShow() {
|
|
MessageStore.message(null);
|
|
}
|
|
|
|
hideLeft(oItem, oEvent) {
|
|
oEvent.preventDefault();
|
|
oEvent.stopPropagation();
|
|
|
|
leftPanelDisabled(true);
|
|
}
|
|
|
|
showLeft(oItem, oEvent) {
|
|
oEvent.preventDefault();
|
|
oEvent.stopPropagation();
|
|
|
|
leftPanelDisabled(false);
|
|
}
|
|
|
|
onBuild(dom) {
|
|
if (this.mobile)
|
|
{
|
|
dom.on('click', () => {
|
|
leftPanelDisabled(true);
|
|
});
|
|
}
|
|
}
|
|
|
|
backToMailBoxClick() {
|
|
setHash(inbox(getFolderInboxName()));
|
|
}
|
|
}
|
|
|
|
export {PaneSettingsUserView, PaneSettingsUserView as default};
|