diff options
author | JayZed <[email protected]> | 2024-09-29 21:05:46 -0400 |
---|---|---|
committer | JayZed <[email protected]> | 2024-09-29 21:05:46 -0400 |
commit | c2a1e4d62c1bbb372127a78e4419a96d3c00e81c (patch) | |
tree | af19b97bbb71b514ef39928e55769fa85064e23a /frontend/src/pages/Series | |
parent | 4cc6806193127f9d6d3f2dab26969471d9bbf159 (diff) | |
parent | 0200bb96d98127ee32b6b66f8d6b9e21d4571a4d (diff) | |
download | bazarr-c2a1e4d62c1bbb372127a78e4419a96d3c00e81c.tar.gz bazarr-c2a1e4d62c1bbb372127a78e4419a96d3c00e81c.zip |
Merge branch 'development' of https://github.com/morpheus65535/bazarr into developmentv1.4.5-beta.7
Diffstat (limited to 'frontend/src/pages/Series')
-rw-r--r-- | frontend/src/pages/Series/index.tsx | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/frontend/src/pages/Series/index.tsx b/frontend/src/pages/Series/index.tsx index 229082444..c142a6767 100644 --- a/frontend/src/pages/Series/index.tsx +++ b/frontend/src/pages/Series/index.tsx @@ -65,25 +65,34 @@ const SeriesView: FunctionComponent = () => { cell: (row) => { const { episodeFileCount, episodeMissingCount, profileId, title } = row.row.original; - let progress = 0; - let label = ""; - if (episodeFileCount === 0 || !profileId) { - progress = 0.0; - } else { - progress = (1.0 - episodeMissingCount / episodeFileCount) * 100.0; - label = `${ - episodeFileCount - episodeMissingCount - }/${episodeFileCount}`; - } + const label = `${episodeFileCount - episodeMissingCount}/${episodeFileCount}`; return ( <Progress.Root key={title} size="xl"> <Progress.Section - value={progress} + value={ + episodeFileCount === 0 || !profileId + ? 0 + : (1.0 - episodeMissingCount / episodeFileCount) * 100.0 + } color={episodeMissingCount === 0 ? "brand" : "yellow"} > <Progress.Label>{label}</Progress.Label> </Progress.Section> + {episodeMissingCount === episodeFileCount && ( + <Progress.Label + styles={{ + label: { + position: "absolute", + top: "3px", + left: "50%", + transform: "translateX(-50%)", + }, + }} + > + {label} + </Progress.Label> + )} </Progress.Root> ); }, |