← marzneshin
/
v0.7.1
/
dashboard/src/modules/hosts/dialogs/mutation/fields/splithttp/mode.tsx
https://dev.kronoz.win/r/marzneshin.git
1import {
2 Select,
3 SelectContent,
4 SelectItem,
5 SelectTrigger,
6 SelectValue,
7 FormControl,
8 FormField,
9 FormItem,
10 FormLabel,
11} from "@marzneshin/common/components";
12import { useTranslation } from "react-i18next";
13
14export const SplitHttpModeField = (
15 { updater }: { updater: (field: string, value: any) => void }
16) => {
17 const { t } = useTranslation();
18 return (
19 <FormField
20 name="splithttp_settings.mode"
21 render={({ field }) => (
22 <FormItem>
23 <FormLabel >
24 {t("Mode")}
25 </FormLabel>
26 <Select onValueChange={(value) => updater("splithttp_settings.mode", value)} defaultValue={field.value}>
27 <FormControl>
28 <SelectTrigger>
29 <SelectValue placeholder="Select a verified email to display" />
30 </SelectTrigger>
31 </FormControl>
32 <SelectContent>
33 <SelectItem value="auto">auto</SelectItem>
34 <SelectItem value="packet-up">packet-up</SelectItem>
35 <SelectItem value="stream-up">stream-up</SelectItem>
36 <SelectItem value="stream-one">stream-one</SelectItem>
37 </SelectContent>
38 </Select>
39 </FormItem>
40 )}
41 />
42 )
43}