Admin panel works in mobile view

This commit is contained in:
djmaze 2021-02-17 09:33:41 +01:00
parent d7994ddab6
commit 1df2e00862
3 changed files with 34 additions and 25 deletions

View file

@ -76,9 +76,15 @@
right: 0;
left: 0;
height: 34px;
padding: 8px @rlLowMargin;
padding: 8px @rlLowMargin 8px 0;
color: #fff;
text-shadow: 0 1px 1px #000;
display: flex;
h4 {
flex-grow: 1;
}
}
.b-content {

View file

@ -8,27 +8,35 @@ import PackageStore 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.adminManLoading = ko.computed(
() =>
'000' !==
[
DomainStore.domains.loading() ? '1' : '0',
PluginStore.plugins.loading() ? '1' : '0',
PackageStore.packages.loading() ? '1' : '0'
].join('')
);
this.leftPanelDisabled = leftPanelDisabled;
this.adminManLoadingVisibility = ko
.computed(() => (this.adminManLoading() ? 'visible' : 'hidden'))
.computed(() => (DomainStore.domains.loading()
|| PluginStore.plugins.loading()
|| PackageStore.packages.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());
}

View file

@ -1,19 +1,14 @@
<div class="b-settings b-admin-right">
<div class="b-toolbar g-ui-user-select-none">
<div class="btn-toolbar">
<h4 class="pull-left">
<i class="icon-spinner" style="margin-top: 2px" data-bind="style: {'visibility': adminManLoadingVisibility }"></i>
&nbsp;&nbsp;
SnappyMail
<span data-i18n="TOP_PANEL/LABEL_ADMIN_PANEL"></span>
</h4>
<div class="btn-group pull-right">
<a class="btn btn-logout" data-bind="click: logoutClick">
<i class="fontastic"></i>
</a>
</div>
</div>
<a class="btn btn-thin-2 show-mobile" data-bind="click: showLeft, visible: leftPanelDisabled()">
<i class="icon-right-middle"></i>
</a>
<a class="btn btn-thin-2 show-mobile" data-bind="click: hideLeft, visible: !leftPanelDisabled()">
<i class="icon-left-middle"></i>
</a>
<i class="icon-spinner" style="margin: 10px" data-bind="style: {'visibility': adminManLoadingVisibility }"></i>
<h4>SnappyMail - <span data-i18n="TOP_PANEL/LABEL_ADMIN_PANEL"></span></h4>
<a class="btn btn-logout fontastic" data-bind="click: logoutClick"></a>
</div>
<div class="b-content">
<div class="content">