rallly: patch to remove other login methods
This commit is contained in:
parent
300efecc13
commit
46f12e25b0
4 changed files with 110 additions and 10 deletions
|
@ -0,0 +1,84 @@
|
|||
diff --git a/apps/web/src/app/[locale]/(auth)/login/login-form.tsx b/apps/web/src/app/[locale]/(auth)/login/login-form.tsx
|
||||
index d4a2adcf..8137a790 100644
|
||||
--- a/apps/web/src/app/[locale]/(auth)/login/login-form.tsx
|
||||
+++ b/apps/web/src/app/[locale]/(auth)/login/login-form.tsx
|
||||
@@ -159,45 +159,7 @@ export function LoginForm() {
|
||||
}
|
||||
})}
|
||||
>
|
||||
- <div className="mb-1 text-2xl font-bold">{t("login")}</div>
|
||||
- <p className="mb-4 text-gray-500">
|
||||
- {t("stepSummary", {
|
||||
- current: 1,
|
||||
- total: 2,
|
||||
- })}
|
||||
- </p>
|
||||
- <fieldset className="mb-2.5">
|
||||
- <label htmlFor="email" className="mb-1 text-gray-500">
|
||||
- {t("email")}
|
||||
- </label>
|
||||
- <Input
|
||||
- className="w-full"
|
||||
- id="email"
|
||||
- size="lg"
|
||||
- error={!!formState.errors.email}
|
||||
- autoFocus={true}
|
||||
- disabled={formState.isSubmitting}
|
||||
- placeholder={t("emailPlaceholder")}
|
||||
- {...register("email", { validate: validEmail })}
|
||||
- />
|
||||
- {formState.errors.email?.message ? (
|
||||
- <div className="mt-2 text-sm text-rose-500">
|
||||
- {formState.errors.email.message}
|
||||
- </div>
|
||||
- ) : null}
|
||||
- </fieldset>
|
||||
<div className="flex flex-col gap-2">
|
||||
- <Button
|
||||
- loading={formState.isSubmitting}
|
||||
- type="submit"
|
||||
- size="lg"
|
||||
- variant="primary"
|
||||
- className=""
|
||||
- >
|
||||
- {t("loginWith", {
|
||||
- provider: t("email"),
|
||||
- })}
|
||||
- </Button>
|
||||
{error === "OAuthAccountNotLinked" ? (
|
||||
<Alert icon={AlertTriangleIcon} variant="destructive">
|
||||
<AlertTitle>
|
||||
@@ -216,12 +178,6 @@ export function LoginForm() {
|
||||
) : null}
|
||||
{alternativeLoginMethods.length > 0 ? (
|
||||
<>
|
||||
- <div className="relative my-4">
|
||||
- <hr className="border-grey-500 absolute top-1/2 w-full border-t" />
|
||||
- <span className="absolute left-1/2 -translate-x-1/2 -translate-y-1/2 transform bg-white px-2 text-center text-xs uppercase text-gray-400">
|
||||
- {t("or", { defaultValue: "Or" })}
|
||||
- </span>
|
||||
- </div>
|
||||
<div className="grid gap-2.5">
|
||||
{alternativeLoginMethods.map((method, i) => (
|
||||
<Button size="lg" key={i} onClick={method.login}>
|
||||
diff --git a/apps/web/src/app/[locale]/(auth)/login/page.tsx b/apps/web/src/app/[locale]/(auth)/login/page.tsx
|
||||
index 10caefed..28d6c85a 100644
|
||||
--- a/apps/web/src/app/[locale]/(auth)/login/page.tsx
|
||||
+++ b/apps/web/src/app/[locale]/(auth)/login/page.tsx
|
||||
@@ -13,16 +13,6 @@ export default async function LoginPage({ params }: { params: Params }) {
|
||||
<AuthCard>
|
||||
<LoginForm />
|
||||
</AuthCard>
|
||||
- <div className="mt-4 pt-4 text-center text-gray-500 sm:text-base">
|
||||
- <Trans
|
||||
- t={t}
|
||||
- i18nKey="notRegistered"
|
||||
- defaults="Don't have an account? <a>Register</a>"
|
||||
- components={{
|
||||
- a: <Link href="/register" className="text-link" />,
|
||||
- }}
|
||||
- />
|
||||
- </div>
|
||||
</div>
|
||||
);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue