chore: bump version to 2.21.6 in package.json and enhance captcha integration across auth components (#418)

- Updated application version from 2.21.4 to 2.21.6 in package.json.
- Added "verifyingCaptcha" message to auth.json for improved user feedback during captcha verification.
- Enhanced captcha handling in various authentication components, including MagicLinkAuthContainer, PasswordResetRequestContainer, and SignUpContainer, to reflect loading states and improve user experience.
This commit is contained in:
Giancarlo Buomprisco
2025-12-02 21:40:56 +08:00
committed by GitHub
parent a78da16790
commit f6c635aac3
10 changed files with 74 additions and 24 deletions

View File

@@ -15,6 +15,7 @@ import {
FormItem,
FormMessage,
} from '@kit/ui/form';
import { If } from '@kit/ui/if';
import { Trans } from '@kit/ui/trans';
import { useCaptcha } from '../captcha/client';
@@ -26,6 +27,7 @@ export function ResendAuthLinkForm(props: {
}) {
const captcha = useCaptcha({ siteKey: props.captchaSiteKey });
const resendLink = useResendLink(captcha.token);
const captchaLoading = !captcha.isReady;
const form = useForm({
resolver: zodResolver(z.object({ email: z.string().email() })),
@@ -83,7 +85,15 @@ export function ResendAuthLinkForm(props: {
}}
/>
<Button disabled={resendLink.isPending}>
<Button disabled={resendLink.isPending || captchaLoading}>
<If condition={captchaLoading}>
<Trans i18nKey={'auth:verifyingCaptcha'} />
</If>
<If condition={resendLink.isPending && !captchaLoading}>
<Trans i18nKey={'auth:resendingLink'} />
</If>
<Trans i18nKey={'auth:resendLink'} defaults={'Resend Link'} />
</Button>
</form>