mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-16 08:24:16 +02:00
render login page on SERVER_LOCK (#1172)
This commit is contained in:
@@ -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} />
|
||||
|
||||
Reference in New Issue
Block a user