mirror of https://github.com/morpheus65535/bazarr
wip
This commit is contained in:
parent
ee90d3f40f
commit
225a3b65d4
|
@ -12,6 +12,7 @@ import {
|
||||||
} from "@mantine/core";
|
} from "@mantine/core";
|
||||||
import { useForm } from "@mantine/form";
|
import { useForm } from "@mantine/form";
|
||||||
import { faTrash } from "@fortawesome/free-solid-svg-icons";
|
import { faTrash } from "@fortawesome/free-solid-svg-icons";
|
||||||
|
import { cond } from "lodash";
|
||||||
import { Action, Selector, SelectorOption, SimpleTable } from "@/components";
|
import { Action, Selector, SelectorOption, SimpleTable } from "@/components";
|
||||||
import ChipInput from "@/components/inputs/ChipInput";
|
import ChipInput from "@/components/inputs/ChipInput";
|
||||||
import { useModals, withModal } from "@/modules/modals";
|
import { useModals, withModal } from "@/modules/modals";
|
||||||
|
@ -87,16 +88,14 @@ const ProfileEditForm: FunctionComponent<Props> = ({
|
||||||
const itemCutoffOptions = useSelectorOptions(
|
const itemCutoffOptions = useSelectorOptions(
|
||||||
form.values.items,
|
form.values.items,
|
||||||
(v) => {
|
(v) => {
|
||||||
const suffix =
|
const suffix = cond([
|
||||||
v.hi === "only"
|
[(v: { forced: string; hi: string }) => v.hi === "only", () => ":hi"],
|
||||||
? ":hi"
|
[(v) => v.hi === "never", () => ":normal"],
|
||||||
: v.hi === "never"
|
[(v) => v.forced === "True", () => ":forced"],
|
||||||
? ":normal"
|
[() => true, () => ""],
|
||||||
: v.forced === "True"
|
]);
|
||||||
? ":forced"
|
|
||||||
: "";
|
|
||||||
|
|
||||||
return v.language + suffix;
|
return v.language + suffix(v);
|
||||||
},
|
},
|
||||||
(v) => String(v.id),
|
(v) => String(v.id),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue