|
|
|
@@ -7,7 +7,7 @@ import useSWR from 'swr' |
|
|
|
import Link from 'next/link' |
|
|
|
import Toast from '../components/base/toast' |
|
|
|
import style from './page.module.css' |
|
|
|
import { IS_CE_EDITION, apiPrefix } from '@/config' |
|
|
|
import { IS_CE_EDITION, SUPPORT_MAIL_LOGIN, apiPrefix } from '@/config' |
|
|
|
import Button from '@/app/components/base/button' |
|
|
|
import { login, oauth } from '@/service/common' |
|
|
|
import { getPurifyHref } from '@/utils' |
|
|
|
@@ -62,6 +62,8 @@ function reducer(state: IState, action: IAction) { |
|
|
|
|
|
|
|
const NormalForm = () => { |
|
|
|
const { t } = useTranslation() |
|
|
|
const useEmailLogin = IS_CE_EDITION || SUPPORT_MAIL_LOGIN |
|
|
|
|
|
|
|
const router = useRouter() |
|
|
|
|
|
|
|
const [state, dispatch] = useReducer(reducer, { |
|
|
|
@@ -150,7 +152,7 @@ const NormalForm = () => { |
|
|
|
|
|
|
|
<div className="w-full mx-auto mt-8"> |
|
|
|
<div className="bg-white "> |
|
|
|
{!IS_CE_EDITION && ( |
|
|
|
{!useEmailLogin && ( |
|
|
|
<div className="flex flex-col gap-3 mt-6"> |
|
|
|
<div className='w-full'> |
|
|
|
<a href={getPurifyHref(`${apiPrefix}/oauth/login/github`)}> |
|
|
|
@@ -194,7 +196,7 @@ const NormalForm = () => { |
|
|
|
)} |
|
|
|
|
|
|
|
{ |
|
|
|
IS_CE_EDITION && <> |
|
|
|
useEmailLogin && <> |
|
|
|
{/* <div className="relative mt-6"> |
|
|
|
<div className="absolute inset-0 flex items-center" aria-hidden="true"> |
|
|
|
<div className="w-full border-t border-gray-300" /> |