Improve Settings handling

This commit is contained in:
djmaze 2021-03-10 11:44:48 +01:00
parent e7b1ce7509
commit 34b25eedea
39 changed files with 160 additions and 150 deletions

View file

@ -2,6 +2,7 @@ import 'External/Admin/ko';
import ko from 'ko';
import { StorageResultType } from 'Common/Enums';
import { Settings, SettingsGet } from 'Common/Globals';
import { AppAdminStore } from 'Stores/Admin/App';
import { CapaAdminStore } from 'Stores/Admin/Capa';
@ -103,11 +104,11 @@ class AdminApp extends AbstractApp {
this.hideLoading();
if (!rl.settings.app('allowAdminPanel')) {
if (!Settings.app('allowAdminPanel')) {
rl.route.root();
setTimeout(() => location.href = '/', 1);
} else {
if (rl.settings.get('Auth')) {
if (SettingsGet('Auth')) {
startScreens([SettingsAdminScreen]);
} else {
startScreens([LoginAdminScreen]);