From 1dd5c6b9f49879c29b5c3020012a4e6f00c1431e Mon Sep 17 00:00:00 2001 From: Arthur Jamet Date: Thu, 21 Dec 2023 10:55:54 +0100 Subject: [PATCH] Front: Details Header: add Download Button (for Movies only) --- front/packages/ui/src/details/header.tsx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/front/packages/ui/src/details/header.tsx b/front/packages/ui/src/details/header.tsx index bd68098a..f030e374 100644 --- a/front/packages/ui/src/details/header.tsx +++ b/front/packages/ui/src/details/header.tsx @@ -74,6 +74,8 @@ import { WatchListInfo } from "../components/watchlist-info"; import { WatchStatusV } from "@kyoo/models/src/resources/watch-status"; import { capitalize } from "@kyoo/primitives"; import { ShowWatchStatusCard } from "./show"; +import Download from "@material-symbols/svg-400/rounded/download.svg"; +import { useDownloader } from "../downloads"; export const TitleLine = ({ isLoading, @@ -107,6 +109,7 @@ export const TitleLine = ({ } & Stylable) => { const { css, theme } = useYoshiki(); const { t } = useTranslation(); + const downloader = useDownloader(); return ( )} + {type === "movie" && slug && ( + downloader(type, slug)} + color={{ xs: theme.user.contrast, md: theme.colors.white }} + {...tooltip(t("home.episodeMore.download"))} + /> + )} {rating !== null && ( <>