mirror of
https://github.com/andwati/dokploy.git
synced 2026-11-16 00:45:18 +00: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"
|
type="password"
|
||||||
placeholder="******************"
|
placeholder="******************"
|
||||||
autoComplete="one-time-code"
|
autoComplete="one-time-code"
|
||||||
|
enablePasswordGenerator={true}
|
||||||
{...field}
|
{...field}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
@@ -578,6 +579,7 @@ export const AddDatabase = ({ environmentId, projectName }: Props) => {
|
|||||||
<Input
|
<Input
|
||||||
type="password"
|
type="password"
|
||||||
placeholder="******************"
|
placeholder="******************"
|
||||||
|
enablePasswordGenerator={true}
|
||||||
{...field}
|
{...field}
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
|
|||||||
@@ -263,7 +263,6 @@ export const Configure2FA = () => {
|
|||||||
type="password"
|
type="password"
|
||||||
placeholder="Enter your password"
|
placeholder="Enter your password"
|
||||||
{...field}
|
{...field}
|
||||||
enablePasswordGenerator={false}
|
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormDescription>
|
<FormDescription>
|
||||||
|
|||||||
@@ -290,7 +290,6 @@ export const Enable2FA = () => {
|
|||||||
type="password"
|
type="password"
|
||||||
placeholder="Enter your password"
|
placeholder="Enter your password"
|
||||||
{...field}
|
{...field}
|
||||||
enablePasswordGenerator={false}
|
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormDescription>
|
<FormDescription>
|
||||||
|
|||||||
@@ -236,7 +236,6 @@ export const ProfileForm = () => {
|
|||||||
placeholder={t("settings.profile.password")}
|
placeholder={t("settings.profile.password")}
|
||||||
{...field}
|
{...field}
|
||||||
value={field.value || ""}
|
value={field.value || ""}
|
||||||
enablePasswordGenerator={false}
|
|
||||||
/>
|
/>
|
||||||
</FormControl>
|
</FormControl>
|
||||||
<FormMessage />
|
<FormMessage />
|
||||||
|
|||||||
@@ -568,7 +568,6 @@ export const SetupMonitoring = ({ serverId }: Props) => {
|
|||||||
type={showToken ? "text" : "password"}
|
type={showToken ? "text" : "password"}
|
||||||
placeholder="Enter your metrics token"
|
placeholder="Enter your metrics token"
|
||||||
{...field}
|
{...field}
|
||||||
enablePasswordGenerator={false}
|
|
||||||
/>
|
/>
|
||||||
<Button
|
<Button
|
||||||
type="button"
|
type="button"
|
||||||
|
|||||||
@@ -10,12 +10,7 @@ export const ToggleVisibilityInput = ({ ...props }: InputProps) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex w-full items-center space-x-2">
|
<div className="flex w-full items-center space-x-2">
|
||||||
<Input
|
<Input ref={inputRef} {...props} type="password" />
|
||||||
ref={inputRef}
|
|
||||||
{...props}
|
|
||||||
type="password"
|
|
||||||
enablePasswordGenerator={false}
|
|
||||||
/>
|
|
||||||
<Button
|
<Button
|
||||||
variant={"secondary"}
|
variant={"secondary"}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|||||||
className,
|
className,
|
||||||
errorMessage,
|
errorMessage,
|
||||||
type,
|
type,
|
||||||
enablePasswordGenerator = true,
|
enablePasswordGenerator = false,
|
||||||
passwordGeneratorLength,
|
passwordGeneratorLength,
|
||||||
...props
|
...props
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user