@@ -46,7 +46,7 @@ export interface ProxyConffigDialogProps {
4646const ProxyUpdateSchema = z . object ( {
4747 id : z . union ( [ z . number ( ) , z . string ( ) ] ) . optional ( ) ,
4848 proxy_ip : z . string ( ) ,
49- proxy_port : z . union ( [ z . number ( ) , z . string ( ) ] ) ,
49+ proxy_port : z . coerce . number ( ) . positive ( ) . max ( 65535 ) ,
5050 description : z . string ( ) . optional ( ) ,
5151 status : z . union ( [ z . nativeEnum ( ProxyStatus ) , z . number ( ) ] ) . optional ( ) ,
5252 username : z . string ( ) . optional ( ) ,
@@ -68,7 +68,7 @@ export function ProxyConfigDialog({
6868 resolver : zodResolver ( ProxyUpdateSchema ) ,
6969 defaultValues : {
7070 proxy_ip : proxyDetails ?. proxy_ip ?? "" ,
71- proxy_port : proxyDetails ?. proxy_port ?? "" ,
71+ proxy_port : proxyDetails ?. proxy_port ,
7272 description : proxyDetails ?. description ?? "" ,
7373 status : proxyDetails ?. status ,
7474 username : proxyDetails ?. username ,
@@ -236,7 +236,11 @@ export function ProxyConfigDialog({
236236 < FormItem >
237237 < FormLabel > Username</ FormLabel >
238238 < FormControl >
239- < Input placeholder = "Proxy username" { ...field } />
239+ < Input
240+ placeholder = "Proxy username"
241+ autoComplete = "off"
242+ { ...field }
243+ />
240244 </ FormControl >
241245 < FormDescription > </ FormDescription >
242246 < FormMessage />
@@ -254,6 +258,7 @@ export function ProxyConfigDialog({
254258 < FormControl >
255259 < PasswordInput
256260 placeholder = "Proxy username"
261+ autoComplete = "new-password"
257262 { ...field }
258263 />
259264 </ FormControl >
0 commit comments