mirror of
https://github.com/Dokploy/dokploy.git
synced 2026-06-15 20:25:23 +02:00
feat: enable password generator for database inputs and disable it for profile settings
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -263,7 +263,6 @@ export const Configure2FA = () => {
|
||||
type="password"
|
||||
placeholder="Enter your password"
|
||||
{...field}
|
||||
enablePasswordGenerator={false}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormDescription>
|
||||
|
||||
@@ -290,7 +290,6 @@ export const Enable2FA = () => {
|
||||
type="password"
|
||||
placeholder="Enter your password"
|
||||
{...field}
|
||||
enablePasswordGenerator={false}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormDescription>
|
||||
|
||||
@@ -236,7 +236,6 @@ export const ProfileForm = () => {
|
||||
placeholder={t("settings.profile.password")}
|
||||
{...field}
|
||||
value={field.value || ""}
|
||||
enablePasswordGenerator={false}
|
||||
/>
|
||||
</FormControl>
|
||||
<FormMessage />
|
||||
|
||||
@@ -568,7 +568,6 @@ export const SetupMonitoring = ({ serverId }: Props) => {
|
||||
type={showToken ? "text" : "password"}
|
||||
placeholder="Enter your metrics token"
|
||||
{...field}
|
||||
enablePasswordGenerator={false}
|
||||
/>
|
||||
<Button
|
||||
type="button"
|
||||
|
||||
@@ -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={() => {
|
||||
|
||||
@@ -16,7 +16,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
||||
className,
|
||||
errorMessage,
|
||||
type,
|
||||
enablePasswordGenerator = true,
|
||||
enablePasswordGenerator = false,
|
||||
passwordGeneratorLength,
|
||||
...props
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user