Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions web/src/components/ui/input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
},
ref,
) => {
const { t } = useTranslation();
const isControlled = value !== undefined;
const { defaultValue, ...restProps } = props;
const inputValue = isControlled ? value : defaultValue;
Expand Down Expand Up @@ -128,6 +129,11 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
{isPasswordInput && (
<button
type="button"
aria-label={
showPassword
? t('common.hidePassword')
: t('common.showPassword')
}
className="
p-2 text-text-secondary
absolute border-0 right-1 top-[50%] translate-y-[-50%]
Expand Down
2 changes: 2 additions & 0 deletions web/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ export default {
tokenPlaceholder: 'e.g. eyJhbGciOiJIUzI1Ni...',
},
selected: 'Selected',
showPassword: 'Show password',
hidePassword: 'Hide password',
},
login: {
loginTitle: 'Sign in to your account',
Expand Down
11 changes: 0 additions & 11 deletions web/src/pages/login-next/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,17 +241,6 @@ const Login = () => {
}
{...field}
/>
{/* <button
type="button"
className="absolute inset-y-0 right-0 pr-3 flex items-center"
onClick={() => setShowPassword(!showPassword)}
>
{showPassword ? (
<EyeOff className="h-4 w-4 text-gray-500" />
) : (
<Eye className="h-4 w-4 text-gray-500" />
)}
</button> */}
</div>
</FormControl>
<FormMessage />
Expand Down