mirror of
https://github.com/morpheus65535/bazarr.git
synced 2025-01-08 15:57:36 +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>[]>(
|
||||
() => [
|
||||
{
|
||||
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",
|
||||
accessor: (d) => `${d.score}%`,
|
||||
|
@ -157,7 +140,7 @@ export const ManualSearchModal: FunctionComponent<Props & BaseModalProps> = (
|
|||
<Dropdown>
|
||||
<Dropdown.Toggle
|
||||
disabled={value.length === 1}
|
||||
className="dropdown-hidden text-dark opacity-100"
|
||||
className="dropdown-hidden text-dark"
|
||||
variant={value.length === 1 ? "link" : "light"}
|
||||
>
|
||||
{display}
|
||||
|
@ -181,6 +164,23 @@ export const ManualSearchModal: FunctionComponent<Props & BaseModalProps> = (
|
|||
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]
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue