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