render login page on SERVER_LOCK (#1172)

This commit is contained in:
jeffvli
2025-12-09 19:58:24 -08:00
parent 8a681a7e95
commit 389dfd08f7
9 changed files with 27 additions and 56 deletions
@@ -1,7 +1,6 @@
import { ReactNode } from 'react';
import { Group } from '/@/shared/components/group/group';
import { Icon } from '/@/shared/components/icon/icon';
import { Stack } from '/@/shared/components/stack/stack';
import { Text } from '/@/shared/components/text/text';
@@ -13,7 +12,6 @@ interface ActionRequiredContainerProps {
export const ActionRequiredContainer = ({ children, title }: ActionRequiredContainerProps) => (
<Stack style={{ cursor: 'default', maxWidth: '700px' }}>
<Group>
<Icon fill="warn" icon="warn" size="lg" />
<Text size="xl" style={{ textTransform: 'uppercase' }}>
{title}
</Text>
@@ -28,20 +28,14 @@ const localSettings = isElectron() ? window.api.localSettings : null;
export const ServerRequired = () => {
const serverList = useServerList();
const serverLock =
(localSettings
? !!localSettings.env.SERVER_LOCK
: !!window.SERVER_LOCK &&
window.SERVER_TYPE &&
window.SERVER_NAME &&
window.SERVER_URL) || false;
const isServerLock = Boolean(window.SERVER_LOCK) || false;
if (Object.keys(serverList).length > 0) {
if (Object.keys(serverList).length > 1) {
return (
<ScrollArea>
<Stack miw="300px">
<ServerSelector />
{!serverLock && (
{!isServerLock && (
<>
<Divider my="lg" />
<AddServerForm onCancel={null} />