mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-03 22:47:03 +03:00
Move Knoin routOff, routOn, routReload & setHash to rl.route.*
This commit is contained in:
parent
03a40f3249
commit
467f615713
17 changed files with 83 additions and 111 deletions
|
|
@ -1,6 +1,5 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { root } from 'Common/Links';
|
||||
import { StorageResultType } from 'Common/Enums';
|
||||
|
||||
import AppStore from 'Stores/Admin/App';
|
||||
|
|
@ -13,7 +12,7 @@ import Remote from 'Remote/Admin/Fetch';
|
|||
import { SettingsAdminScreen } from 'Screen/Admin/Settings';
|
||||
import { LoginAdminScreen } from 'Screen/Admin/Login';
|
||||
|
||||
import { hideLoading, routeOff, setHash, startScreens } from 'Knoin/Knoin';
|
||||
import { hideLoading, startScreens } from 'Knoin/Knoin';
|
||||
import { AbstractApp } from 'App/Abstract';
|
||||
|
||||
class AdminApp extends AbstractApp {
|
||||
|
|
@ -108,13 +107,8 @@ class AdminApp extends AbstractApp {
|
|||
hideLoading();
|
||||
|
||||
if (!rl.settings.app('allowAdminPanel')) {
|
||||
routeOff();
|
||||
setHash(root(), true);
|
||||
routeOff();
|
||||
|
||||
setTimeout(() =>
|
||||
location.href = '/'
|
||||
, 1);
|
||||
rl.route.root();
|
||||
setTimeout(() => location.href = '/', 1);
|
||||
} else {
|
||||
if (rl.settings.get('Auth')) {
|
||||
startScreens([SettingsAdminScreen]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue