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

35 lines
813 B
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 { PackageAdminStore } from 'Stores/Admin/Package';
2016-06-30 08:02:45 +08:00
import { AbstractViewRight } from 'Knoin/AbstractViews';
2021-03-10 18:44:48 +08:00
import { leftPanelDisabled, Settings } from 'Common/Globals';
2021-02-17 16:33:41 +08:00
class PaneSettingsAdminView extends AbstractViewRight {
constructor() {
super('Admin/Settings/Pane', 'AdminPane');
2021-03-10 18:44:48 +08:00
this.version = ko.observable(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(() => PackageAdminStore.loading() ? 'visible' : 'hidden');
}
toggleLeft(item, event) {
2021-02-17 16:33:41 +08:00
event.preventDefault();
event.stopPropagation();
leftPanelDisabled(!leftPanelDisabled());
2021-02-17 16:33:41 +08:00
}
logoutClick() {
Remote.adminLogout(() => rl.logoutReload());
}
}
2016-06-30 08:02:45 +08:00
2021-01-22 23:32:08 +08:00
export { PaneSettingsAdminView };