mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-06-29 07:16:07 +00:00
Bugfix: invalid settingsGet in dev/Stores/Admin/App.js
Cleanup login/logout location reloading
This commit is contained in:
@@ -5,9 +5,7 @@ import { getNotification } from 'Common/Translator';
|
||||
|
||||
import Remote from 'Remote/Admin/Ajax';
|
||||
|
||||
import { getApp } from 'Helper/Apps/Admin';
|
||||
|
||||
import { view, command, ViewType, routeOff } from 'Knoin/Knoin';
|
||||
import { view, command, ViewType, routeOff, routeReload } from 'Knoin/Knoin';
|
||||
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
|
||||
|
||||
@view({
|
||||
@@ -70,7 +68,7 @@ class LoginAdminView extends AbstractViewNext {
|
||||
(sResult, oData) => {
|
||||
if (StorageResultType.Success === sResult && oData && 'AdminLogin' === oData.Action) {
|
||||
if (oData.Result) {
|
||||
getApp().loginAndLogoutReload(true);
|
||||
routeReload();
|
||||
} else if (oData.ErrorCode) {
|
||||
this.submitRequest(false);
|
||||
this.submitError(getNotification(oData.ErrorCode));
|
||||
|
||||
@@ -6,8 +6,6 @@ import DomainStore from 'Stores/Admin/Domain';
|
||||
import PluginStore from 'Stores/Admin/Plugin';
|
||||
import PackageStore from 'Stores/Admin/Package';
|
||||
|
||||
import { getApp } from 'Helper/Apps/Admin';
|
||||
|
||||
import { view, ViewType } from 'Knoin/Knoin';
|
||||
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
|
||||
|
||||
@@ -38,9 +36,7 @@ class PaneSettingsAdminView extends AbstractViewNext {
|
||||
}
|
||||
|
||||
logoutClick() {
|
||||
Remote.adminLogout(() => {
|
||||
getApp().loginAndLogoutReload(true, true);
|
||||
});
|
||||
Remote.adminLogout(() => rl.logoutReload());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -19,11 +19,11 @@ import * as Local from 'Storage/Client';
|
||||
|
||||
import Remote from 'Remote/User/Ajax';
|
||||
|
||||
import { getApp } from 'Helper/Apps/User';
|
||||
|
||||
import { view, command, ViewType, routeOff, showScreenPopup } from 'Knoin/Knoin';
|
||||
import { view, command, ViewType, routeOff, showScreenPopup, routeReload } from 'Knoin/Knoin';
|
||||
import { AbstractViewNext } from 'Knoin/AbstractViewNext';
|
||||
|
||||
import { rootAdmin } from 'Common/Links';
|
||||
|
||||
const Settings = rl.settings;
|
||||
|
||||
@view({
|
||||
@@ -180,9 +180,9 @@ class LoginUserView extends AbstractViewNext {
|
||||
|
||||
setTimeout(() => this.querySelector('.inputAdditionalCode').focus(), 100);
|
||||
} else if (oData.Admin) {
|
||||
getApp().redirectToAdminPanel();
|
||||
setTimeout(() => location.href = rootAdmin(), 100);
|
||||
} else {
|
||||
getApp().loginAndLogoutReload(false);
|
||||
routeReload();
|
||||
}
|
||||
} else if (oData.ErrorCode) {
|
||||
this.submitRequest(false);
|
||||
|
||||
Reference in New Issue
Block a user