aboutsummaryrefslogtreecommitdiffhomepage
path: root/frontend/src/pages/Settings
diff options
context:
space:
mode:
authormorpheus65535 <[email protected]>2024-06-14 12:24:23 -0400
committermorpheus65535 <[email protected]>2024-06-14 12:24:23 -0400
commit5ad392630649c9dd53c33794d51e51f8b9c8fa09 (patch)
tree1666ab4424cadeb07e2d5dc66dd7407e3d1c20d9 /frontend/src/pages/Settings
parentd719d4c6df0c8d8dbc71e29aabf59f5d0987ac18 (diff)
downloadbazarr-5ad392630649c9dd53c33794d51e51f8b9c8fa09.tar.gz
bazarr-5ad392630649c9dd53c33794d51e51f8b9c8fa09.zip
Reverted normal only (non-hi) option to languages profile. Will be properly reintroduced later.v1.4.4-beta.6
Diffstat (limited to 'frontend/src/pages/Settings')
-rw-r--r--frontend/src/pages/Settings/Languages/table.tsx18
1 files changed, 9 insertions, 9 deletions
diff --git a/frontend/src/pages/Settings/Languages/table.tsx b/frontend/src/pages/Settings/Languages/table.tsx
index 29902a546..c2ed9d968 100644
--- a/frontend/src/pages/Settings/Languages/table.tsx
+++ b/frontend/src/pages/Settings/Languages/table.tsx
@@ -2,7 +2,7 @@ import { FunctionComponent, useCallback, useMemo } from "react";
import { Column } from "react-table";
import { Badge, Button, Group } from "@mantine/core";
import { faTrash, faWrench } from "@fortawesome/free-solid-svg-icons";
-import { cloneDeep, cond } from "lodash";
+import { cloneDeep } from "lodash";
import { Action, SimpleTable } from "@/components";
import {
anyCutoff,
@@ -194,14 +194,14 @@ interface ItemProps {
const ItemBadge: FunctionComponent<ItemProps> = ({ cutoff, item }) => {
const text = useMemo(() => {
- const suffix = cond([
- [(v: { forced: string; hi: string }) => v.hi === "only", () => ":HI"],
- [(v) => v.hi === "never", () => ":Normal"],
- [(v) => v.forced === "True", () => ":Forced"],
- [() => true, () => ""],
- ]);
- return item.language + suffix(item);
- }, [item]);
+ let result = item.language;
+ if (item.hi === "True") {
+ result += ":HI";
+ } else if (item.forced === "True") {
+ result += ":Forced";
+ }
+ return result;
+ }, [item.hi, item.forced, item.language]);
return (
<Badge
title={cutoff ? "Ignore others if this one is available" : undefined}