Open-source agentic AI Search Execution Platform. Track AI visibility, find opportunities, and let agents turn signals into prioritized actions and drafted fixes across ChatGPT, Claude, Gemini, Google AI Overviews, Google AI Mode, Perplexity, Grok, and Microsoft Copilot.
TypeScript aeoai-agentai-searchanswer-engine-optimizationbrand-monitoringchatgptclaudecopilotdockergeminigeogoogle-ai-overviewsgrokmcpnextjsopen-sourceperplexityseosupabasetypescript
feat(auth): add password visibility toggle to auth forms (#210)
Maitreyee Deshmukhffc79326d256
diff --git a/web/src/components/auth/reset-password-form.tsx b/web/src/components/auth/reset-password-form.tsxindex 47b6cddb5..edcf3d25b 100644--- a/web/src/components/auth/reset-password-form.tsx+++ b/web/src/components/auth/reset-password-form.tsx@@ -5,7 +5,7 @@ import { useTranslations } from 'next-intl';import { useRouter } from '@/i18n/navigation';import { createClient } from '@/lib/supabase/client';import { Button } from '@/components/ui/button';-import { Input } from '@/components/ui/input';+import { PasswordInput } from '@/components/ui/password-input';import { Label } from '@/components/ui/label';import { toast } from 'sonner';import { Loader2 } from 'lucide-react';@@ -51,9 +51,8 @@ export function ResetPasswordForm() {<form onSubmit={handleSubmit} className="space-y-4"><div className="space-y-2"><Label htmlFor="password">{t('newPassword')}</Label>- <Input+ <PasswordInputid="password"- type="password"placeholder={t('passwordPlaceholder')}value={password}onChange={(e) => setPassword(e.target.value)}@@ -65,9 +64,8 @@ export function ResetPasswordForm() {<div className="space-y-2"><Label htmlFor="confirmPassword">{t('confirmPassword')}</Label>- <Input+ <PasswordInputid="confirmPassword"- type="password"placeholder={t('passwordPlaceholder')}value={confirm}onChange={(e) => setConfirm(e.target.value)}diff --git a/web/src/components/auth/sign-in-form.tsx b/web/src/components/auth/sign-in-form.tsxindex a35feee03..39dfc503d 100644--- a/web/src/components/auth/sign-in-form.tsx+++ b/web/src/components/auth/sign-in-form.tsx@@ -7,6 +7,7 @@ import { useRouter, Link } from '@/i18n/navigation';import { createClient } from '@/lib/supabase/client';import { Button } from '@/components/ui/button';import { Input } from '@/components/ui/input';+import { PasswordInput } from '@/components/ui/password-input';import { Label } from '@/components/ui/label';import { toast } from 'sonner';import { Loader2 } from 'lucide-react';@@ -93,9 +94,8 @@ export function SignInForm() {{t('forgotPassword')}</Link></div>- <Input+ <PasswordInputid="password"- type="password"placeholder={t('passwordPlaceholder')}value={password}onChange={(e) => setPassword(e.target.value)}diff --git a/web/src/components/auth/sign-up-form.tsx b/web/src/components/auth/sign-up-form.tsxindex 5a022c1fb..a44fef457 100644--- a/web/src/components/auth/sign-up-form.tsx+++ b/web/src/components/auth/sign-up-form.tsx@@ -7,6 +7,7 @@ import { useRouter, Link } from '@/i18n/navigation';import { createClient } from '@/lib/supabase/client';import { Button } from '@/components/ui/button';import { Input } from '@/components/ui/input';+import { PasswordInput } from '@/components/ui/password-input';import { Label } from '@/components/ui/label';import { toast } from 'sonner';import { Loader2 } from 'lucide-react';@@ -104,9 +105,8 @@ export function SignUpForm() {<div className="space-y-2"><Label htmlFor="password">{t('password')}</Label>- <Input+ <PasswordInputid="password"- type="password"placeholder={t('passwordPlaceholder')}value={password}onChange={(e) => setPassword(e.target.value)}diff --git a/web/src/components/team/accept-invitation-card.tsx b/web/src/components/team/accept-invitation-card.tsxindex 6bbed31cf..51ae1e808 100644--- a/web/src/components/team/accept-invitation-card.tsx+++ b/web/src/components/team/accept-invitation-card.tsx@@ -6,6 +6,7 @@ import { createClient } from '@/lib/supabase/client';import { acceptInvitation, type TeamRole } from '@/lib/actions/team';import { Button } from '@/components/ui/button';import { Input } from '@/components/ui/input';+import { PasswordInput } from '@/components/ui/password-input';import { Label } from '@/components/ui/label';import { toast } from 'sonner';import { Loader2, Users } from 'lucide-react';@@ -156,9 +157,8 @@ export function AcceptInvitationCard({<div className="space-y-2"><Label htmlFor="invite-password">Set a password</Label>- <Input+ <PasswordInputid="invite-password"- type="password"placeholder="At least 8 characters"value={password}onChange={(e) => setPassword(e.target.value)}@@ -171,9 +171,8 @@ export function AcceptInvitationCard({<div className="space-y-2"><Label htmlFor="invite-confirm-password">Confirm password</Label>- <Input+ <PasswordInputid="invite-confirm-password"- type="password"placeholder="Repeat the password"value={confirmPassword}onChange={(e) => setConfirmPassword(e.target.value)}diff --git a/web/src/components/ui/password-input.tsx b/web/src/components/ui/password-input.tsxnew file mode 100644index 000000000..3d224d38f--- /dev/null+++ b/web/src/components/ui/password-input.tsx@@ -0,0 +1,26 @@+'use client';++import { useState } from 'react';+import { Eye, EyeOff } from 'lucide-react';+import { Input } from '@/components/ui/input';++type PasswordInputProps = Omit<React.ComponentProps<typeof Input>, 'type'>;++export function PasswordInput(props: PasswordInputProps) {+ const [visible, setVisible] = useState(false);++ return (+ <div className="relative">+ <Input type={visible ? 'text' : 'password'} {...props} className="pr-10" />+ <button+ type="button"+ onClick={() => setVisible((v) => !v)}+ aria-label={visible ? 'Hide password' : 'Show password'}+ className="absolute right-2 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground"+ tabIndex={-1}+ >+ {visible ? <EyeOff className="h-4 w-4" /> : <Eye className="h-4 w-4" />}+ </button>+ </div>+ );+}