From 1f0c397f0a5729d20f81ec54422e3b01cb82596e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Delattre?= Date: Sat, 22 Apr 2017 10:53:52 +0200 Subject: [PATCH] Add indicator for tracked content --- src/public/js/components/list/details.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/src/public/js/components/list/details.js b/src/public/js/components/list/details.js index 4ffdcb7..5b40c56 100644 --- a/src/public/js/components/list/details.js +++ b/src/public/js/components/list/details.js @@ -9,11 +9,30 @@ export default function ListDetails(props) { ).join(', '); } + let wishlistStr = ""; + if (props.data.wishlisted === true) { + wishlistStr = "Wishlisted"; + } + if (props.data.tracked_episode !== null && props.data.tracked_season != null) { + let season = props.data.tracked_season; + let episode = props.data.tracked_episode; + if ((season === 0) && (episode === 0)) { + wishlistStr = "Whole show tracked"; + } else { + wishlistStr = `Tracked from season ${season} episode ${episode}`; + } + } + return (
-
+

{props.data.title}

{props.data.title}

+ {wishlistStr !== "" && + + {wishlistStr} + + }

{props.data.year}

{props.data.runtime &&