mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Front: Details Header: add Download Button (for Movies only)
This commit is contained in:
parent
fdd3b72e52
commit
1dd5c6b9f4
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user