mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-04 14:02:17 +08:00
db0d03db83
Cleanup: Stores and tooltips
45 lines
1.1 KiB
JavaScript
45 lines
1.1 KiB
JavaScript
import ko from 'ko';
|
|
|
|
import Remote from 'Remote/Admin/Fetch';
|
|
|
|
import { DomainAdminStore } from 'Stores/Admin/Domain';
|
|
import { PluginAdminStore } from 'Stores/Admin/Plugin';
|
|
import { PackageAdminStore } from 'Stores/Admin/Package';
|
|
|
|
import { AbstractViewRight } from 'Knoin/AbstractViews';
|
|
|
|
import { leftPanelDisabled } from 'Common/Globals';
|
|
|
|
class PaneSettingsAdminView extends AbstractViewRight {
|
|
constructor() {
|
|
super('Admin/Settings/Pane', 'AdminPane');
|
|
|
|
this.version = ko.observable(rl.settings.app('version'));
|
|
|
|
this.leftPanelDisabled = leftPanelDisabled;
|
|
|
|
this.adminManLoadingVisibility = ko
|
|
.computed(() => (DomainAdminStore.loading()
|
|
|| PluginAdminStore.loading()
|
|
|| PackageAdminStore.loading()) ? 'visible' : 'hidden')
|
|
.extend({ rateLimit: 300 });
|
|
}
|
|
|
|
hideLeft(item, event) {
|
|
event.preventDefault();
|
|
event.stopPropagation();
|
|
leftPanelDisabled(true);
|
|
}
|
|
|
|
showLeft(item, event) {
|
|
event.preventDefault();
|
|
event.stopPropagation();
|
|
leftPanelDisabled(false);
|
|
}
|
|
|
|
logoutClick() {
|
|
Remote.adminLogout(() => rl.logoutReload());
|
|
}
|
|
}
|
|
|
|
export { PaneSettingsAdminView };
|