mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-25 00:36:31 +02:00
fix: add autoComplete attributes to form inputs for better UX
- Add autoComplete="username" and "current-password" to login form - Add autoComplete="email" and "new-password" to register form inputs - Add autoComplete="name" to profile display name input - Add autoComplete="off" to connector search input - Enables browser password managers and autofill functionality
This commit is contained in:
parent
4066cbc6f0
commit
36391acfd0
4 changed files with 7 additions and 0 deletions
|
|
@ -156,6 +156,7 @@ export function LocalLoginForm() {
|
|||
<input
|
||||
id="email"
|
||||
type="email"
|
||||
autoComplete="username"
|
||||
required
|
||||
placeholder="you@example.com"
|
||||
value={username}
|
||||
|
|
@ -177,6 +178,7 @@ export function LocalLoginForm() {
|
|||
<input
|
||||
id="password"
|
||||
type={showPassword ? "text" : "password"}
|
||||
autoComplete="current-password"
|
||||
required
|
||||
placeholder="Enter your password"
|
||||
value={password}
|
||||
|
|
|
|||
|
|
@ -238,6 +238,7 @@ export default function RegisterPage() {
|
|||
<input
|
||||
id="email"
|
||||
type="email"
|
||||
autoComplete="email"
|
||||
required
|
||||
placeholder="you@example.com"
|
||||
value={email}
|
||||
|
|
@ -261,6 +262,7 @@ export default function RegisterPage() {
|
|||
<input
|
||||
id="password"
|
||||
type="password"
|
||||
autoComplete="new-password"
|
||||
required
|
||||
placeholder="Enter your password"
|
||||
value={password}
|
||||
|
|
@ -284,6 +286,7 @@ export default function RegisterPage() {
|
|||
<input
|
||||
id="confirmPassword"
|
||||
type="password"
|
||||
autoComplete="new-password"
|
||||
required
|
||||
placeholder="Confirm your password"
|
||||
value={confirmPassword}
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@ export function ProfileContent() {
|
|||
<Input
|
||||
id="display-name"
|
||||
type="text"
|
||||
autoComplete="name"
|
||||
placeholder={user?.email?.split("@")[0]}
|
||||
value={displayName}
|
||||
onChange={(e) => setDisplayName(e.target.value)}
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ export const ConnectorDialogHeader: FC<ConnectorDialogHeaderProps> = ({
|
|||
<Search className="absolute left-3 top-1/2 -translate-y-1/2 size-4 text-gray-500 dark:text-gray-500" />
|
||||
<input
|
||||
type="text"
|
||||
autoComplete="off"
|
||||
placeholder="Search"
|
||||
className={cn(
|
||||
"w-full bg-slate-400/5 dark:bg-white/5 hover:bg-slate-400/10 dark:hover:bg-white/10 focus:bg-slate-400/10 dark:focus:bg-white/10 border border-border rounded-xl pl-9 py-2 text-sm transition-all outline-none placeholder:text-muted-foreground/50",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue