diff --git a/surfsense_web/app/(home)/login/LocalLoginForm.tsx b/surfsense_web/app/(home)/login/LocalLoginForm.tsx index 62d2a2a66..bd9c2c1b4 100644 --- a/surfsense_web/app/(home)/login/LocalLoginForm.tsx +++ b/surfsense_web/app/(home)/login/LocalLoginForm.tsx @@ -12,6 +12,7 @@ import { getAuthErrorDetails, isNetworkError, shouldRetry } from "@/lib/auth-err import { AUTH_TYPE } from "@/lib/env-config"; import { ValidationError } from "@/lib/error"; import { trackLoginAttempt, trackLoginFailure, trackLoginSuccess } from "@/lib/posthog/events"; +import { Spinner } from "@/components/ui/spinner"; export function LocalLoginForm() { const t = useTranslations("auth"); @@ -42,9 +43,6 @@ export function LocalLoginForm() { // Track login attempt trackLoginAttempt("local"); - // Show loading toast - const loadingToast = toast.loading(tCommon("loading")); - try { const data = await login({ username, @@ -62,8 +60,7 @@ export function LocalLoginForm() { // Success toast toast.success(t("login_success"), { - id: loadingToast, - description: "Redirecting to dashboard...", + description: "Redirecting to dashboard", duration: 2000, }); @@ -76,7 +73,6 @@ export function LocalLoginForm() { trackLoginFailure("local", err.message); setError({ title: err.name, message: err.message }); toast.error(err.name, { - id: loadingToast, description: err.message, duration: 6000, }); @@ -106,7 +102,6 @@ export function LocalLoginForm() { // Show error toast with conditional retry action const toastOptions: any = { - id: loadingToast, description: errorDetails.description, duration: 6000, }; @@ -244,9 +239,16 @@ export function LocalLoginForm() { diff --git a/surfsense_web/app/(home)/register/page.tsx b/surfsense_web/app/(home)/register/page.tsx index 243ad4c60..f8170ff63 100644 --- a/surfsense_web/app/(home)/register/page.tsx +++ b/surfsense_web/app/(home)/register/page.tsx @@ -18,6 +18,7 @@ import { trackRegistrationSuccess, } from "@/lib/posthog/events"; import { AmbientBackground } from "../login/AmbientBackground"; +import { Spinner } from "@/components/ui/spinner"; export default function RegisterPage() { const t = useTranslations("auth"); @@ -60,9 +61,6 @@ export default function RegisterPage() { // Track registration attempt trackRegistrationAttempt(); - // Show loading toast - const loadingToast = toast.loading(t("creating_account")); - try { await register({ email, @@ -77,7 +75,6 @@ export default function RegisterPage() { // Success toast toast.success(t("register_success"), { - id: loadingToast, description: t("redirecting_login"), duration: 2000, }); @@ -95,7 +92,6 @@ export default function RegisterPage() { trackRegistrationFailure("Registration disabled"); setError({ title: "Registration is disabled", message: friendlyMessage }); toast.error("Registration is disabled", { - id: loadingToast, description: friendlyMessage, duration: 6000, }); @@ -109,7 +105,6 @@ export default function RegisterPage() { trackRegistrationFailure(err.message); setError({ title: err.name, message: err.message }); toast.error(err.name, { - id: loadingToast, description: err.message, duration: 6000, }); @@ -137,7 +132,6 @@ export default function RegisterPage() { // Show error toast with conditional retry action const toastOptions: any = { - id: loadingToast, description: errorDetails.description, duration: 6000, }; @@ -295,9 +289,16 @@ export default function RegisterPage() { diff --git a/surfsense_web/components/homepage/hero-section.tsx b/surfsense_web/components/homepage/hero-section.tsx index 0ff61ac28..7ccdd850c 100644 --- a/surfsense_web/components/homepage/hero-section.tsx +++ b/surfsense_web/components/homepage/hero-section.tsx @@ -184,7 +184,7 @@ function GetStartedButton() { return ( Get Started diff --git a/surfsense_web/messages/en.json b/surfsense_web/messages/en.json index f23359bf2..f14c73ddc 100644 --- a/surfsense_web/messages/en.json +++ b/surfsense_web/messages/en.json @@ -46,6 +46,7 @@ "hide_password": "Hide password", "remember_me": "Remember Me", "sign_in": "Sign In", + "signing_in": "Signing in", "sign_up": "Sign Up", "sign_in_with": "Sign in with {provider}", "dont_have_account": "Don't have an account?", diff --git a/surfsense_web/messages/zh.json b/surfsense_web/messages/zh.json index 3c4b6cf34..6838b0f52 100644 --- a/surfsense_web/messages/zh.json +++ b/surfsense_web/messages/zh.json @@ -46,6 +46,7 @@ "hide_password": "隐藏密码", "remember_me": "记住我", "sign_in": "登录", + "signing_in": "正在登录", "sign_up": "注册", "sign_in_with": "使用 {provider} 登录", "dont_have_account": "还没有账户?",