mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-31 20:24:27 -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 { WatchStatusV } from "@kyoo/models/src/resources/watch-status";
|
||||||
import { capitalize } from "@kyoo/primitives";
|
import { capitalize } from "@kyoo/primitives";
|
||||||
import { ShowWatchStatusCard } from "./show";
|
import { ShowWatchStatusCard } from "./show";
|
||||||
|
import Download from "@material-symbols/svg-400/rounded/download.svg";
|
||||||
|
import { useDownloader } from "../downloads";
|
||||||
|
|
||||||
export const TitleLine = ({
|
export const TitleLine = ({
|
||||||
isLoading,
|
isLoading,
|
||||||
@ -107,6 +109,7 @@ export const TitleLine = ({
|
|||||||
} & Stylable) => {
|
} & Stylable) => {
|
||||||
const { css, theme } = useYoshiki();
|
const { css, theme } = useYoshiki();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const downloader = useDownloader();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container
|
<Container
|
||||||
@ -239,6 +242,14 @@ export const TitleLine = ({
|
|||||||
color={{ xs: theme.user.contrast, md: theme.colors.white }}
|
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 && (
|
{rating !== null && (
|
||||||
<>
|
<>
|
||||||
<DottedSeparator
|
<DottedSeparator
|
||||||
|
Loading…
x
Reference in New Issue
Block a user