diff --git a/src/components/ui/password-input.tsx b/src/components/ui/password-input.tsx new file mode 100644 index 00000000..46c64ff4 --- /dev/null +++ b/src/components/ui/password-input.tsx @@ -0,0 +1,40 @@ +"use client"; + +import * as React from "react"; +import { Eye, EyeOff } from "lucide-react"; +import { Input } from "@/components/ui/input"; +import { cn } from "@/lib/utils"; + +interface PasswordInputProps + extends React.InputHTMLAttributes {} + +export const PasswordInput = React.forwardRef( + ({ className, ...props }, ref) => { + const [showPassword, setShowPassword] = React.useState(false); + + return ( +
+ + +
+ ); + } +); + +PasswordInput.displayName = "PasswordInput"; diff --git a/src/ui/Mobile/Homepage/HomepageAuth.tsx b/src/ui/Mobile/Homepage/HomepageAuth.tsx index c43a6f0d..cac732c7 100644 --- a/src/ui/Mobile/Homepage/HomepageAuth.tsx +++ b/src/ui/Mobile/Homepage/HomepageAuth.tsx @@ -20,6 +20,7 @@ import { verifyTOTPLogin, setCookie } from "@/ui/main-axios.ts"; +import {PasswordInput} from "@/components/ui/password-input.tsx"; function getCookie(name: string) { return document.cookie.split('; ').reduce((r, v) => { @@ -743,14 +744,14 @@ export function HomepageAuth({
- setPassword(e.target.value)} disabled={loading || internalLoggedIn}/>
{tab === "signup" && (
- setSignupConfirmPassword(e.target.value)}