Front: Details Header: add Download Button (for Movies only)

This commit is contained in:
Arthur Jamet 2023-12-21 10:55:54 +01:00 committed by Zoe Roux
parent fdd3b72e52
commit 1dd5c6b9f4

View File

@ -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 (
<Container
@ -239,6 +242,14 @@ export const TitleLine = ({
color={{ xs: theme.user.contrast, md: theme.colors.white }}
/>
)}
{type === "movie" && slug && (
<IconButton
icon={Download}
onPress={() => downloader(type, slug)}
color={{ xs: theme.user.contrast, md: theme.colors.white }}
{...tooltip(t("home.episodeMore.download"))}
/>
)}
{rating !== null && (
<>
<DottedSeparator