summaryrefslogtreecommitdiffhomepage
path: root/frontend/src/pages
diff options
context:
space:
mode:
authorIƱaki Larramendi <[email protected]>2024-07-10 22:17:54 -0300
committerGitHub <[email protected]>2024-07-11 10:17:54 +0900
commit03f0bdbe39e9551cecf53876db0993e0a30de3aa (patch)
treeb56e2d1622abb60289667fd2acbc262806ef0b8e /frontend/src/pages
parentebf3471eec3895ba06c5be3dfe1fb7efb7622100 (diff)
downloadbazarr-03f0bdbe39e9551cecf53876db0993e0a30de3aa.tar.gz
bazarr-03f0bdbe39e9551cecf53876db0993e0a30de3aa.zip
Added series empty subtitle episodes progress bar labels (#2575)v1.4.4-beta.21
Diffstat (limited to 'frontend/src/pages')
-rw-r--r--frontend/src/pages/Series/index.tsx31
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>
);
},