allow chars in 2fa input form closes #3532

This commit is contained in:
miloschwartz
2026-08-06 11:39:06 -04:00
parent 835a30cffe
commit 82b86263dc
2 changed files with 18 additions and 14 deletions
+13 -11
View File
@@ -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>
); );
} }
+5 -3
View File
@@ -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) {