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

29 lines
715 B
JavaScript
Raw Normal View History

import ko from 'ko';
2022-01-01 00:02:32 +08:00
import { koComputable } from 'External/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('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;
2022-01-01 00:02:32 +08:00
this.adminManLoadingVisibility = koComputable(() => PackageAdminStore.loading() ? 'visible' : 'hidden');
}
logoutClick() {
2021-12-03 07:11:19 +08:00
Remote.request('AdminLogout', () => rl.logoutReload());
}
}
2016-06-30 08:02:45 +08:00
2021-01-22 23:32:08 +08:00
export { PaneSettingsAdminView };