mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-01-09 16:27:45 +08:00
Fixed manual search modal.
This commit is contained in:
parent
dfc14a60b8
commit
c2333d1d26
1 changed files with 18 additions and 18 deletions
|
@ -80,23 +80,6 @@ export const ManualSearchModal: FunctionComponent<Props & BaseModalProps> = (
|
||||||
|
|
||||||
const columns = useMemo<Column<SearchResultType>[]>(
|
const columns = useMemo<Column<SearchResultType>[]>(
|
||||||
() => [
|
() => [
|
||||||
{
|
|
||||||
accessor: "subtitle",
|
|
||||||
Cell: ({ row, externalUpdate }) => {
|
|
||||||
const result = row.original;
|
|
||||||
return (
|
|
||||||
<AsyncButton
|
|
||||||
size="sm"
|
|
||||||
variant="light"
|
|
||||||
noReset
|
|
||||||
promise={() => onSelect(item!, result)}
|
|
||||||
onSuccess={() => externalUpdate && externalUpdate(row)}
|
|
||||||
>
|
|
||||||
<FontAwesomeIcon icon={faDownload}></FontAwesomeIcon>
|
|
||||||
</AsyncButton>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
Header: "Score",
|
Header: "Score",
|
||||||
accessor: (d) => `${d.score}%`,
|
accessor: (d) => `${d.score}%`,
|
||||||
|
@ -157,7 +140,7 @@ export const ManualSearchModal: FunctionComponent<Props & BaseModalProps> = (
|
||||||
<Dropdown>
|
<Dropdown>
|
||||||
<Dropdown.Toggle
|
<Dropdown.Toggle
|
||||||
disabled={value.length === 1}
|
disabled={value.length === 1}
|
||||||
className="dropdown-hidden text-dark opacity-100"
|
className="dropdown-hidden text-dark"
|
||||||
variant={value.length === 1 ? "link" : "light"}
|
variant={value.length === 1 ? "link" : "light"}
|
||||||
>
|
>
|
||||||
{display}
|
{display}
|
||||||
|
@ -181,6 +164,23 @@ export const ManualSearchModal: FunctionComponent<Props & BaseModalProps> = (
|
||||||
return <StateIcon matches={matches} dont={dont_matches}></StateIcon>;
|
return <StateIcon matches={matches} dont={dont_matches}></StateIcon>;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
accessor: "subtitle",
|
||||||
|
Cell: ({ row, externalUpdate }) => {
|
||||||
|
const result = row.original;
|
||||||
|
return (
|
||||||
|
<AsyncButton
|
||||||
|
size="sm"
|
||||||
|
variant="light"
|
||||||
|
noReset
|
||||||
|
promise={() => onSelect(item!, result)}
|
||||||
|
onSuccess={() => externalUpdate && externalUpdate(row)}
|
||||||
|
>
|
||||||
|
<FontAwesomeIcon icon={faDownload}></FontAwesomeIcon>
|
||||||
|
</AsyncButton>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
],
|
],
|
||||||
[onSelect, item]
|
[onSelect, item]
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue