mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-01-09 16:27:45 +08:00
Fix issues in language profile modal
This commit is contained in:
parent
e462686c17
commit
65e68d4409
2 changed files with 5 additions and 4 deletions
|
@ -16,7 +16,7 @@ export const LanguageSelector: FunctionComponent<
|
|||
return (
|
||||
<CLanguageSelector
|
||||
multiple
|
||||
defaultValue={enabled}
|
||||
value={enabled}
|
||||
options={options}
|
||||
onChange={(val) => {
|
||||
update(val, settingKey);
|
||||
|
|
|
@ -19,6 +19,7 @@ import {
|
|||
useCloseModal,
|
||||
usePayload,
|
||||
} from "../../components";
|
||||
import { BuildKey } from "../../utilites";
|
||||
import { Input, Message } from "../components";
|
||||
import { cutoffOptions } from "./options";
|
||||
interface Props {
|
||||
|
@ -170,7 +171,7 @@ const LanguagesProfileModal: FunctionComponent<Props & BaseModalProps> = (
|
|||
return (
|
||||
<Form.Check
|
||||
custom
|
||||
id={`${item.language}-forced`}
|
||||
id={BuildKey(item.id, item.language, "forced")}
|
||||
checked={value === "True"}
|
||||
onChange={(v) => {
|
||||
item.forced = v.target.checked ? "True" : "False";
|
||||
|
@ -188,7 +189,7 @@ const LanguagesProfileModal: FunctionComponent<Props & BaseModalProps> = (
|
|||
return (
|
||||
<Form.Check
|
||||
custom
|
||||
id={`${item.language}-hi`}
|
||||
id={BuildKey(item.id, item.language, "hi")}
|
||||
checked={value === "True"}
|
||||
onChange={(v) => {
|
||||
item.hi = v.target.checked ? "True" : "False";
|
||||
|
@ -206,7 +207,7 @@ const LanguagesProfileModal: FunctionComponent<Props & BaseModalProps> = (
|
|||
return (
|
||||
<Form.Check
|
||||
custom
|
||||
id={`${item.language}-audio`}
|
||||
id={BuildKey(item.id, item.language, "audio")}
|
||||
checked={value === "True"}
|
||||
onChange={(v) => {
|
||||
item.audio_exclude = v.target.checked ? "True" : "False";
|
||||
|
|
Loading…
Reference in a new issue