mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-16 21:50:35 +02:00
add login page for locked server
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { openModal } from '@mantine/modals';
|
||||
import isElectron from 'is-electron';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Navigate } from 'react-router';
|
||||
|
||||
@@ -16,6 +17,8 @@ import { Group } from '/@/shared/components/group/group';
|
||||
import { Icon } from '/@/shared/components/icon/icon';
|
||||
import { Stack } from '/@/shared/components/stack/stack';
|
||||
|
||||
const localSettings = isElectron() ? window.api.localSettings : null;
|
||||
|
||||
const ActionRequiredRoute = () => {
|
||||
const { t } = useTranslation();
|
||||
const currentServer = useCurrentServerWithCredential();
|
||||
@@ -60,7 +63,7 @@ const ActionRequiredRoute = () => {
|
||||
<Stack mt="2rem">
|
||||
{canReturnHome && <Navigate to={AppRoute.HOME} />}
|
||||
{/* This should be displayed if a credential is required */}
|
||||
{isCredentialRequired && (
|
||||
{isCredentialRequired && !localSettings?.env.SERVER_LOCK && (
|
||||
<Group justify="center" wrap="nowrap">
|
||||
<Button
|
||||
fullWidth
|
||||
|
||||
Reference in New Issue
Block a user