From 8fed6bfa426c834f63ba1652cf6a3317807b7d60 Mon Sep 17 00:00:00 2001 From: Josh Hawkins <32435876+hawkeye217@users.noreply.github.com> Date: Sun, 1 Nov 2026 18:35:36 -0600 Subject: [PATCH] remove password strength meter and fix confirm password feedback The strength meter still scored against the old 8 character and character class rules, so any password with a digit, like test1234, showed a full green "Very Strong" bar next to the failing 12 character requirement. The meter is gone and the length checklist is the only feedback. The password field's form message duplicated the checklist, and editing the password never revalidated the confirm field, so a fixed mismatch kept showing "Passwords do not match". Editing the password now revalidates the confirm field once it has a value, and both dialogs show a live match/mismatch indicator in place of the confirm form message. --- web/public/locales/en/views/settings.json | 7 -- .../components/overlay/CreateUserDialog.tsx | 37 ++-------- .../components/overlay/SetPasswordDialog.tsx | 67 +++++++------------ web/src/utils/passwordUtil.ts | 38 ----------- 4 files changed, 33 insertions(+), 116 deletions(-) diff --git a/web/public/locales/en/views/settings.json b/web/public/locales/en/views/settings.json index c6e483f4ee..a759f394c5 100644 --- a/web/public/locales/en/views/settings.json +++ b/web/public/locales/en/views/settings.json @@ -1086,13 +1086,6 @@ "title": "Confirm Password", "placeholder": "Confirm Password" }, - "strength": { - "title": "Password strength: ", - "weak": "Weak", - "medium": "Medium", - "strong": "Strong", - "veryStrong": "Very Strong" - }, "requirements": { "title": "Password requirements:", "length": "At least 12 characters" diff --git a/web/src/components/overlay/CreateUserDialog.tsx b/web/src/components/overlay/CreateUserDialog.tsx index 2953a29cb9..d33b2117aa 100644 --- a/web/src/components/overlay/CreateUserDialog.tsx +++ b/web/src/components/overlay/CreateUserDialog.tsx @@ -37,12 +37,7 @@ import { useTranslation } from "react-i18next"; import { isDesktop, isMobile } from "react-device-detect"; import { cn } from "@/lib/utils"; import { FrigateConfig } from "@/types/frigateConfig"; -import { - calculatePasswordStrength, - getPasswordRequirements, - getPasswordStrengthLabel, - getPasswordStrengthColor, -} from "@/utils/passwordUtil"; +import { getPasswordRequirements } from "@/utils/passwordUtil"; import { MobilePage, MobilePageContent, @@ -123,12 +118,6 @@ export default function CreateUserDialog({ const passwordsMatch = password === confirmPassword; const showMatchIndicator = password && confirmPassword; - // Password strength calculation - const passwordStrength = useMemo( - () => calculatePasswordStrength(password), - [password], - ); - const requirements = useMemo( () => getPasswordRequirements(password), [password], @@ -224,6 +213,12 @@ export default function CreateUserDialog({ type={showPasswordVisible ? "text" : "password"} className="h-10 pr-10" {...field} + onChange={(e) => { + field.onChange(e); + if (form.getValues("confirmPassword")) { + form.trigger("confirmPassword"); + } + }} />