snappymail/dev/View/Admin/Settings/Pane.js

46 lines
1.1 KiB
JavaScript
Raw Normal View History

import ko from 'ko';
2016-06-30 08:02:45 +08:00
import Remote from 'Remote/Admin/Fetch';
2016-06-30 08:02:45 +08:00
import { DomainAdminStore } from 'Stores/Admin/Domain';
import { PluginAdminStore } from 'Stores/Admin/Plugin';
import { PackageAdminStore } from 'Stores/Admin/Package';
2016-06-30 08:02:45 +08:00
import { AbstractViewRight } from 'Knoin/AbstractViews';
2021-02-17 16:33:41 +08:00
import { leftPanelDisabled } from 'Common/Globals';
class PaneSettingsAdminView extends AbstractViewRight {
constructor() {
super('Admin/Settings/Pane', 'AdminPane');
this.version = ko.observable(rl.settings.app('version'));
2021-02-17 16:33:41 +08:00
this.leftPanelDisabled = leftPanelDisabled;
2019-07-05 03:19:24 +08:00
this.adminManLoadingVisibility = ko
.computed(() => (DomainAdminStore.loading()
|| PluginAdminStore.loading()
|| PackageAdminStore.loading()) ? 'visible' : 'hidden')
2019-07-05 03:19:24 +08:00
.extend({ rateLimit: 300 });
}
2021-02-17 16:33:41 +08:00
hideLeft(item, event) {
event.preventDefault();
event.stopPropagation();
leftPanelDisabled(true);
}
showLeft(item, event) {
event.preventDefault();
event.stopPropagation();
leftPanelDisabled(false);
}
logoutClick() {
Remote.adminLogout(() => rl.logoutReload());
}
}
2016-06-30 08:02:45 +08:00
2021-01-22 23:32:08 +08:00
export { PaneSettingsAdminView };