From 01b24ea084e9996d60e823e0cfb655bccf3461f8 Mon Sep 17 00:00:00 2001 From: Innei Date: Fri, 31 Oct 2025 15:16:44 +0800 Subject: [PATCH] feat: add forgot password on reset password form - Replaced Button component with a styled button in AuthProviderButton for improved styling. - Updated button properties to use 'disabled' instead of 'isLoading' for better UX. - Added a link to the "Forget Password" page in the UpdateExistingPasswordForm for enhanced user navigation. Signed-off-by: Innei --- .../src/modules/profile/account-management.tsx | 13 ++++++++----- .../src/modules/profile/update-password-form.tsx | 11 ++++++++++- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/apps/desktop/layer/renderer/src/modules/profile/account-management.tsx b/apps/desktop/layer/renderer/src/modules/profile/account-management.tsx index d6b0c2893..6e4f12ded 100644 --- a/apps/desktop/layer/renderer/src/modules/profile/account-management.tsx +++ b/apps/desktop/layer/renderer/src/modules/profile/account-management.tsx @@ -1,4 +1,4 @@ -import { Button } from "@follow/components/ui/button/index.js" +import { styledButtonVariant } from "@follow/components/ui/button/variants.js" import { authProvidersConfig } from "@follow/constants" import { IN_ELECTRON } from "@follow/shared/constants" import { cn } from "@follow/utils/utils" @@ -32,9 +32,12 @@ function AuthProviderButton({ provider }: { provider: string }) { if (!account && IN_ELECTRON) return null return ( - + ) } diff --git a/apps/desktop/layer/renderer/src/modules/profile/update-password-form.tsx b/apps/desktop/layer/renderer/src/modules/profile/update-password-form.tsx index 76e2065ea..501688ed1 100644 --- a/apps/desktop/layer/renderer/src/modules/profile/update-password-form.tsx +++ b/apps/desktop/layer/renderer/src/modules/profile/update-password-form.tsx @@ -36,6 +36,8 @@ const updatePasswordFormSchema = z const UpdateExistingPasswordForm = () => { const { t } = useTranslation("settings") + const { t: tApp } = useTranslation("app") + const form = useForm>({ resolver: zodResolver(updatePasswordFormSchema), defaultValues: { @@ -119,7 +121,14 @@ const UpdateExistingPasswordForm = () => { )} /> -