← marzneshin
/
v0.7.0
/
dashboard/src/modules/hosts/dialogs/mutation/fields/mux-settings/xudp-proxy-443.tsx
https://dev.kronoz.win/r/marzneshin.git
dashboard/src/modules/hosts/dialogs/mutation/fields/mux-settings/xudp-proxy-443.tsx
· TypeScript
Blame
Raw
1import {
2 FormControl,
3 FormField,
4 FormItem,
5 FormLabel,
6 Select,
7 SelectContent,
8 SelectItem,
9 SelectTrigger,
10 SelectValue,
11} from "@marzneshin/common/components";
12import { useTranslation } from "react-i18next";
13
14export const XudpProxy443Field = ({
15 updater,
16}: {
17 updater: (field: string, value: any) => void;
18}) => {
19 const { t } = useTranslation();
20 return (
21 <FormField
22 name="mux_settings.mux_cool_settings.xudp_proxy_443"
23 render={({ field }) => (
24 <FormItem>
25 <FormLabel>{t("Xudp Proxy 443")}</FormLabel>
26 <Select
27 onValueChange={(value) =>
28 updater(
29 "mux_settings.mux_cool_settings.xudp_proxy_443",
30 value,
31 )
32 }
33 defaultValue={field.value}
34 >
35 <FormControl>
36 <SelectTrigger>
37 <SelectValue placeholder="Select protocol" />
38 </SelectTrigger>
39 </FormControl>
40 <SelectContent>
41 <SelectItem value="reject">reject</SelectItem>
42 <SelectItem value="allow">allow</SelectItem>
43 <SelectItem value="skip">skip</SelectItem>
44 </SelectContent>
45 </Select>
46 </FormItem>
47 )}
48 />
49 );
50};