Skip to content

Job application tracker and AI-powered job search assistant. Helps job seekers manage their search journey with AI resume review, job matching, task logging, and application analytics, all while keeping your data private.

feat: Show/hide password input

Khuram Niaze6a6b27bbfc5
diff --git a/src/components/SupportDialog.tsx b/src/components/SupportDialog.tsx
index 705c035..dab96ab 100644
--- a/src/components/SupportDialog.tsx
+++ b/src/components/SupportDialog.tsx
@@ -44,6 +44,14 @@ export function SupportDialog({ open, onOpenChange }: SupportDialogProps) {
<p className="text-sm text-muted-foreground">
© {currentYear} JobSync. All rights reserved.
</p>
+ <a
+ href="https://jobsync.ca/"
+ target="_blank"
+ rel="noopener noreferrer"
+ className="text-sm text-primary hover:underline"
+ >
+ https://jobsync.ca/
+ </a>
</div>
</div>
</DialogContent>
diff --git a/src/components/auth/SigninForm.tsx b/src/components/auth/SigninForm.tsx
index b1f93b8..df715f2 100644
--- a/src/components/auth/SigninForm.tsx
+++ b/src/components/auth/SigninForm.tsx
@@ -17,6 +17,7 @@ import { useState, useTransition } from "react";
import { useRouter } from "next/navigation";
import { SigninFormSchema } from "@/models/signinForm.schema";
import Loading from "../Loading";
+import { Eye, EyeOff } from "lucide-react";
function SigninForm() {
const [isPending, startTransition] = useTransition();
@@ -31,6 +32,7 @@ function SigninForm() {
});
const [errorMessage, setError] = useState("");
+ const [showPassword, setShowPassword] = useState(false);
const router = useRouter();
const onSubmit = async (data: z.infer<typeof SigninFormSchema>) => {
@@ -67,6 +69,8 @@ function SigninForm() {
<FormControl>
<Input
id="email"
+ type="email"
+ autoComplete="email"
placeholder="[email protected]"
{...field}
/>
@@ -84,7 +88,34 @@ function SigninForm() {
<FormItem>
<FormLabel htmlFor="password">Password</FormLabel>
<FormControl>
- <Input id="password" type="password" {...field} />
+ <div className="relative">
+ <Input
+ id="password"
+ type={showPassword ? "text" : "password"}
+ autoComplete="current-password"
+ spellCheck={false}
+ autoCorrect="off"
+ autoCapitalize="off"
+ {...field}
+ />
+ <Button
+ type="button"
+ variant="ghost"
+ size="icon"
+ className="absolute right-0 top-0 h-full px-3 text-muted-foreground"
+ onClick={() => setShowPassword((v) => !v)}
+ aria-label={
+ showPassword ? "Hide password" : "Show password"
+ }
+ tabIndex={-1}
+ >
+ {showPassword ? (
+ <EyeOff className="h-4 w-4" aria-hidden="true" />
+ ) : (
+ <Eye className="h-4 w-4" aria-hidden="true" />
+ )}
+ </Button>
+ </div>
</FormControl>
<FormMessage />
</FormItem>
diff --git a/src/components/auth/SignupForm.tsx b/src/components/auth/SignupForm.tsx
index 15bd5ab..4406fef 100644
--- a/src/components/auth/SignupForm.tsx
+++ b/src/components/auth/SignupForm.tsx
@@ -17,6 +17,7 @@ import { useState, useTransition } from "react";
import { useRouter } from "next/navigation";
import { SignupFormSchema } from "@/models/signupForm.schema";
import Loading from "../Loading";
+import { Eye, EyeOff } from "lucide-react";
function SignupForm() {
const [isPending, startTransition] = useTransition();
@@ -32,6 +33,7 @@ function SignupForm() {
});
const [errorMessage, setError] = useState("");
+ const [showPassword, setShowPassword] = useState(false);
const router = useRouter();
const onSubmit = async (data: z.infer<typeof SignupFormSchema>) => {
@@ -81,7 +83,12 @@ function SignupForm() {
<FormItem>
<FormLabel>Email</FormLabel>
<FormControl>
- <Input placeholder="[email protected]" {...field} />
+ <Input
+ type="email"
+ autoComplete="email"
+ placeholder="[email protected]"
+ {...field}
+ />
</FormControl>
<FormMessage />
</FormItem>
@@ -96,7 +103,33 @@ function SignupForm() {
<FormItem>
<FormLabel>Password</FormLabel>
<FormControl>
- <Input type="password" {...field} />
+ <div className="relative">
+ <Input
+ type={showPassword ? "text" : "password"}
+ autoComplete="new-password"
+ spellCheck={false}
+ autoCorrect="off"
+ autoCapitalize="off"
+ {...field}
+ />
+ <Button
+ type="button"
+ variant="ghost"
+ size="icon"
+ className="absolute right-0 top-0 h-full px-3 text-muted-foreground"
+ onClick={() => setShowPassword((v) => !v)}
+ aria-label={
+ showPassword ? "Hide password" : "Show password"
+ }
+ tabIndex={-1}
+ >
+ {showPassword ? (
+ <EyeOff className="h-4 w-4" aria-hidden="true" />
+ ) : (
+ <Eye className="h-4 w-4" aria-hidden="true" />
+ )}
+ </Button>
+ </div>
</FormControl>
<FormMessage />
</FormItem>