mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Add download option on contextual menues
This commit is contained in:
parent
2603c1b29d
commit
b51c77dfa7
@ -23,9 +23,11 @@ import { ComponentProps } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import MoreVert from "@material-symbols/svg-400/rounded/more_vert.svg";
|
||||
import Info from "@material-symbols/svg-400/rounded/info.svg";
|
||||
import Download from "@material-symbols/svg-400/rounded/download.svg";
|
||||
import { WatchStatusV, queryFn, useAccount } from "@kyoo/models";
|
||||
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
||||
import { watchListIcon } from "./watchlist-info";
|
||||
import { downloadFile } from "../downloads/download";
|
||||
|
||||
export const EpisodesContext = ({
|
||||
type = "episode",
|
||||
@ -74,6 +76,13 @@ export const EpisodesContext = ({
|
||||
<Menu.Item label={t("show.watchlistMark.null")} onSelect={() => mutation.mutate(null)} />
|
||||
)}
|
||||
</Menu.Sub>
|
||||
{type !== "show" && (
|
||||
<Menu.Item
|
||||
label={t("home.episodeMore.download")}
|
||||
icon={Download}
|
||||
onSelect={() => downloadFile(type, slug)}
|
||||
/>
|
||||
)}
|
||||
</Menu>
|
||||
);
|
||||
};
|
||||
|
@ -7,7 +7,8 @@
|
||||
"none": "No episodes",
|
||||
"watchlistLogin": "To keep track of what you watched or plan to watch, you need to login.",
|
||||
"episodeMore": {
|
||||
"goToShow": "Go to show"
|
||||
"goToShow": "Go to show",
|
||||
"download": "Download"
|
||||
}
|
||||
},
|
||||
"show": {
|
||||
|
@ -7,7 +7,8 @@
|
||||
"none": "Aucun episode",
|
||||
"watchlistLogin": "Pour suivre ce que vous avez regardé ou prévoyez de regarder, vous devez vous connecter.",
|
||||
"episodeMore": {
|
||||
"goToShow": "Aller a la serie"
|
||||
"goToShow": "Aller a la serie",
|
||||
"download": "Télécharger"
|
||||
}
|
||||
},
|
||||
"show": {
|
||||
|
Loading…
x
Reference in New Issue
Block a user