From 8a0c3a07452069b24505263924fa40596eb84dc5 Mon Sep 17 00:00:00 2001 From: Korbs Date: Thu, 19 Dec 2024 16:24:17 -0500 Subject: [PATCH] Remove login form, only allow the SudoVanilla Gateway --- src/pages/auth/login.tsx | 68 +++------------------------------------- 1 file changed, 4 insertions(+), 64 deletions(-) diff --git a/src/pages/auth/login.tsx b/src/pages/auth/login.tsx index 06051b4..72feb97 100644 --- a/src/pages/auth/login.tsx +++ b/src/pages/auth/login.tsx @@ -4,17 +4,13 @@ import { Card, Center, CheckIcon, - Divider, Group, Modal, - PasswordInput, PinInput, Text, - TextInput, Title, } from '@mantine/core'; import { useForm } from '@mantine/form'; -import { IconBrandDiscordFilled, IconBrandGithub, IconBrandGoogle, IconKey } from '@tabler/icons-react'; import useFetch from 'hooks/useFetch'; import Head from 'next/head'; import Link from 'next/link'; @@ -24,7 +20,6 @@ export { getServerSideProps } from 'middleware/getServerSideProps'; export default function Login({ title, - user_registration, oauth_registration, bypass_local_login, oauth_providers: unparsed, @@ -40,20 +35,6 @@ export default function Login({ const oauth_providers = JSON.parse(unparsed); - const show_local_login = - router.query.local === 'true' || !(bypass_local_login && oauth_providers?.length > 0); - - const icons = { - GitHub: IconBrandGithub, - Discord: IconBrandDiscordFilled, - Google: IconBrandGoogle, - Authentik: IconKey, - }; - - for (const provider of oauth_providers) { - provider.Icon = icons[provider.name]; - } - const form = useForm({ initialValues: { username: '', @@ -124,7 +105,7 @@ export default function Login({ return ( <> - {full_title} + SudoVanilla Zipline
- - - {bypass_local_login ? ` Login to ${title} with` : title} - - {oauth_registration && ( <> @@ -178,55 +154,19 @@ export default function Login({ ))} - {show_local_login && } )} - - {show_local_login && ( -
onSubmit(v))}> - - - - - {user_registration && ( - - Don't have an account? Register - - )} - - - - - )} -
);