Skip to content

Commit

Permalink
Added eligible for upgrade icon in histories.
Browse files Browse the repository at this point in the history
  • Loading branch information
morpheus65535 committed Apr 17, 2021
1 parent 4784211 commit 5f66724
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 2 deletions.
23 changes: 22 additions & 1 deletion frontend/src/History/Movies/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { faInfoCircle } from "@fortawesome/free-solid-svg-icons";
import { faInfoCircle, faRecycle } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import React, { FunctionComponent, useCallback, useMemo } from "react";
import { Badge, OverlayTrigger, Popover } from "react-bootstrap";
Expand Down Expand Up @@ -91,6 +91,27 @@ const MoviesHistoryView: FunctionComponent<Props> = () => {
);
},
},
{
accessor: "upgradable",
Cell: (row) => {
const overlay = (
<Popover id={`description-${row.row.id}`}>
<Popover.Content>
This Subtitles File Is Eligible For An Upgrade.
</Popover.Content>
</Popover>
);
if (row.value) {
return (
<OverlayTrigger overlay={overlay}>
<FontAwesomeIcon size="sm" icon={faRecycle}></FontAwesomeIcon>
</OverlayTrigger>
);
} else {
return null;
}
},
},
{
accessor: "blacklisted",
Cell: ({ row, externalUpdate }) => {
Expand Down
23 changes: 22 additions & 1 deletion frontend/src/History/Series/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { faInfoCircle } from "@fortawesome/free-solid-svg-icons";
import { faInfoCircle, faRecycle } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import React, { FunctionComponent, useCallback, useMemo } from "react";
import { Badge, OverlayTrigger, Popover } from "react-bootstrap";
Expand Down Expand Up @@ -98,6 +98,27 @@ const SeriesHistoryView: FunctionComponent<Props> = () => {
);
},
},
{
accessor: "upgradable",
Cell: (row) => {
const overlay = (
<Popover id={`description-${row.row.id}`}>
<Popover.Content>
This Subtitles File Is Eligible For An Upgrade.
</Popover.Content>
</Popover>
);
if (row.value) {
return (
<OverlayTrigger overlay={overlay}>
<FontAwesomeIcon size="sm" icon={faRecycle}></FontAwesomeIcon>
</OverlayTrigger>
);
} else {
return null;
}
},
},
{
accessor: "blacklisted",
Cell: ({ row, externalUpdate }) => {
Expand Down

0 comments on commit 5f66724

Please sign in to comment.