mirror of
https://github.com/fosrl/pangolin.git
synced 2026-08-07 13:08:03 +02:00
allow chars in 2fa input form closes #3532
This commit is contained in:
@@ -24,19 +24,21 @@ export function ContactSalesBanner() {
|
|||||||
<ExternalLink className="size-3.5 shrink-0" />
|
<ExternalLink className="size-3.5 shrink-0" />
|
||||||
</Link>
|
</Link>
|
||||||
{" " + t("contactSalesOr") + " "}
|
{" " + t("contactSalesOr") + " "}
|
||||||
<Link
|
<span className="whitespace-nowrap">
|
||||||
href="https://pangolin.net/contact"
|
<Link
|
||||||
target="_blank"
|
href="https://pangolin.net/contact"
|
||||||
rel="noopener noreferrer"
|
target="_blank"
|
||||||
className="inline-flex items-center gap-1 font-medium text-black-600 underline"
|
rel="noopener noreferrer"
|
||||||
>
|
className="inline-flex items-center gap-1 font-medium text-black-600 underline"
|
||||||
{t("contactSalesContactUs")}
|
>
|
||||||
<ExternalLink className="size-3.5 shrink-0" />
|
{t("contactSalesContactUs")}
|
||||||
</Link>
|
<ExternalLink className="size-3.5 shrink-0" />
|
||||||
.
|
</Link>
|
||||||
|
.
|
||||||
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ import {
|
|||||||
import { InputOTP, InputOTPGroup, InputOTPSlot } from "./ui/input-otp";
|
import { InputOTP, InputOTPGroup, InputOTPSlot } from "./ui/input-otp";
|
||||||
import { Alert, AlertDescription } from "@app/components/ui/alert";
|
import { Alert, AlertDescription } from "@app/components/ui/alert";
|
||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
import { REGEXP_ONLY_DIGITS } from "input-otp";
|
import { REGEXP_ONLY_DIGITS_AND_CHARS } from "input-otp";
|
||||||
|
|
||||||
const MFA_OTP_INPUT_ID = "mfa-otp-code";
|
const MFA_OTP_INPUT_ID = "mfa-otp-code";
|
||||||
|
|
||||||
@@ -82,9 +82,11 @@ export default function MfaInputForm({
|
|||||||
maxLength={6}
|
maxLength={6}
|
||||||
{...field}
|
{...field}
|
||||||
autoComplete="one-time-code"
|
autoComplete="one-time-code"
|
||||||
inputMode="numeric"
|
inputMode="text"
|
||||||
autoFocus
|
autoFocus
|
||||||
pattern={REGEXP_ONLY_DIGITS}
|
pattern={
|
||||||
|
REGEXP_ONLY_DIGITS_AND_CHARS
|
||||||
|
}
|
||||||
onChange={(value: string) => {
|
onChange={(value: string) => {
|
||||||
field.onChange(value);
|
field.onChange(value);
|
||||||
if (value.length === 6) {
|
if (value.length === 6) {
|
||||||
|
|||||||
Reference in New Issue
Block a user