fix: turn off autoComplete for some inputs

This commit is contained in:
Tobias Barsnes
2024-12-25 03:23:02 +01:00
parent e035062a10
commit d8dbdb2b9e
4 changed files with 19 additions and 12 deletions

View File

@@ -1,4 +1,5 @@
import { Badge } from "@/components/ui/badge"; import { Badge } from "@/components/ui/badge";
import { Checkbox } from "@/components/ui/checkbox";
import { import {
Dialog, Dialog,
DialogContent, DialogContent,
@@ -10,7 +11,6 @@ import { Loader2 } from "lucide-react";
import { useEffect, useRef, useState } from "react"; import { useEffect, useRef, useState } from "react";
import { TerminalLine } from "../../docker/logs/terminal-line"; import { TerminalLine } from "../../docker/logs/terminal-line";
import { type LogLine, parseLogs } from "../../docker/logs/utils"; import { type LogLine, parseLogs } from "../../docker/logs/utils";
import { Checkbox } from "@/components/ui/checkbox";
interface Props { interface Props {
logPath: string | null; logPath: string | null;

View File

@@ -471,6 +471,7 @@ export const AddDatabase = ({ projectId, projectName }: Props) => {
<FormControl> <FormControl>
<Input <Input
placeholder={`Default ${databasesUserDefaultPlaceholder[type]}`} placeholder={`Default ${databasesUserDefaultPlaceholder[type]}`}
autoComplete="off"
{...field} {...field}
/> />
</FormControl> </FormControl>
@@ -491,6 +492,7 @@ export const AddDatabase = ({ projectId, projectName }: Props) => {
<Input <Input
type="password" type="password"
placeholder="******************" placeholder="******************"
autoComplete="off"
{...field} {...field}
/> />
</FormControl> </FormControl>

View File

@@ -159,7 +159,11 @@ export const AddRegistry = () => {
<FormItem> <FormItem>
<FormLabel>Username</FormLabel> <FormLabel>Username</FormLabel>
<FormControl> <FormControl>
<Input placeholder="Username" {...field} /> <Input
placeholder="Username"
autoComplete="off"
{...field}
/>
</FormControl> </FormControl>
<FormMessage /> <FormMessage />
@@ -177,6 +181,7 @@ export const AddRegistry = () => {
<FormControl> <FormControl>
<Input <Input
placeholder="Password" placeholder="Password"
autoComplete="off"
{...field} {...field}
type="password" type="password"
/> />

View File

@@ -9,14 +9,6 @@ import {
DialogHeader, DialogHeader,
DialogTitle, DialogTitle,
} from "@/components/ui/dialog"; } from "@/components/ui/dialog";
import { Input } from "@/components/ui/input";
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
import { import {
Form, Form,
FormControl, FormControl,
@@ -25,15 +17,23 @@ import {
FormLabel, FormLabel,
FormMessage, FormMessage,
} from "@/components/ui/form"; } from "@/components/ui/form";
import { Input } from "@/components/ui/input";
import {
Select,
SelectContent,
SelectItem,
SelectTrigger,
SelectValue,
} from "@/components/ui/select";
import { api } from "@/utils/api"; import { api } from "@/utils/api";
import { zodResolver } from "@hookform/resolvers/zod";
import { ArrowRightLeft, Plus, Trash2 } from "lucide-react"; import { ArrowRightLeft, Plus, Trash2 } from "lucide-react";
import { useTranslation } from "next-i18next"; import { useTranslation } from "next-i18next";
import type React from "react"; import type React from "react";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { useFieldArray, useForm } from "react-hook-form";
import { toast } from "sonner"; import { toast } from "sonner";
import { z } from "zod"; import { z } from "zod";
import { useFieldArray, useForm } from "react-hook-form";
import { zodResolver } from "@hookform/resolvers/zod";
interface Props { interface Props {
children: React.ReactNode; children: React.ReactNode;