mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-20 19:04:23 +02:00
fix: properly handle server lock and related properties
This commit is contained in:
@@ -6,6 +6,10 @@ import { Navigate } from 'react-router';
|
||||
|
||||
import { api } from '/@/renderer/api';
|
||||
import { PageHeader } from '/@/renderer/components/page-header/page-header';
|
||||
import {
|
||||
isLegacyAuth,
|
||||
isServerLock,
|
||||
} from '/@/renderer/features/action-required/utils/window-properties';
|
||||
import JellyfinIcon from '/@/renderer/features/servers/assets/jellyfin.png';
|
||||
import NavidromeIcon from '/@/renderer/features/servers/assets/navidrome.png';
|
||||
import SubsonicIcon from '/@/renderer/features/servers/assets/opensubsonic.png';
|
||||
@@ -48,17 +52,17 @@ const LoginRoute = () => {
|
||||
const currentServer = useCurrentServer();
|
||||
|
||||
// Check if server lock is configured
|
||||
const isServerLock = Boolean(window.SERVER_LOCK) || false;
|
||||
const serverLock = isServerLock();
|
||||
const serverType = window.SERVER_TYPE ? toServerType(window.SERVER_TYPE) : null;
|
||||
const serverName = window.SERVER_NAME || '';
|
||||
const serverUrl = window.SERVER_URL || '';
|
||||
const legacyAuth = isServerLock ? Boolean(window.LEGACY_AUTHENTICATION) || false : false;
|
||||
const legacyAuth = serverLock && isLegacyAuth();
|
||||
|
||||
const config = [
|
||||
{
|
||||
isValid: true,
|
||||
key: 'SERVER_LOCK',
|
||||
value: isServerLock,
|
||||
value: serverLock,
|
||||
},
|
||||
{
|
||||
isValid: serverType !== null,
|
||||
|
||||
Reference in New Issue
Block a user