feat: enable password generator for database inputs and disable it for profile settings

This commit is contained in:
Mauricio Siu
2026-01-12 09:19:22 -06:00
parent 5ddcdd843c
commit 18d980c3ff
7 changed files with 4 additions and 11 deletions

View File

@@ -559,6 +559,7 @@ export const AddDatabase = ({ environmentId, projectName }: Props) => {
type="password"
placeholder="******************"
autoComplete="one-time-code"
enablePasswordGenerator={true}
{...field}
/>
</FormControl>
@@ -578,6 +579,7 @@ export const AddDatabase = ({ environmentId, projectName }: Props) => {
<Input
type="password"
placeholder="******************"
enablePasswordGenerator={true}
{...field}
/>
</FormControl>

View File

@@ -263,7 +263,6 @@ export const Configure2FA = () => {
type="password"
placeholder="Enter your password"
{...field}
enablePasswordGenerator={false}
/>
</FormControl>
<FormDescription>

View File

@@ -290,7 +290,6 @@ export const Enable2FA = () => {
type="password"
placeholder="Enter your password"
{...field}
enablePasswordGenerator={false}
/>
</FormControl>
<FormDescription>

View File

@@ -236,7 +236,6 @@ export const ProfileForm = () => {
placeholder={t("settings.profile.password")}
{...field}
value={field.value || ""}
enablePasswordGenerator={false}
/>
</FormControl>
<FormMessage />

View File

@@ -568,7 +568,6 @@ export const SetupMonitoring = ({ serverId }: Props) => {
type={showToken ? "text" : "password"}
placeholder="Enter your metrics token"
{...field}
enablePasswordGenerator={false}
/>
<Button
type="button"

View File

@@ -10,12 +10,7 @@ export const ToggleVisibilityInput = ({ ...props }: InputProps) => {
return (
<div className="flex w-full items-center space-x-2">
<Input
ref={inputRef}
{...props}
type="password"
enablePasswordGenerator={false}
/>
<Input ref={inputRef} {...props} type="password" />
<Button
variant={"secondary"}
onClick={() => {

View File

@@ -16,7 +16,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
className,
errorMessage,
type,
enablePasswordGenerator = true,
enablePasswordGenerator = false,
passwordGeneratorLength,
...props
},