Handle watchstatus of entries without history entry

This commit is contained in:
Zoe Roux
2026-03-31 17:55:39 +02:00
parent d3a929855a
commit f126a0592e
8 changed files with 2082 additions and 8 deletions
@@ -29,8 +29,25 @@ export const EntryContext = ({
} & Partial<ComponentProps<typeof Menu>> &
Partial<ComponentProps<typeof IconButton>>) => {
// const downloader = useDownloader();
const account = useAccount();
const { t } = useTranslation();
const markAsSeenMutation = useMutation({
method: "POST",
path: ["api", "profiles", "me", "history"],
body: [
{
percent: 100,
entry: slug,
videoId: null,
time: 0,
playedDate: null,
external: true,
},
],
invalidate: null,
});
return (
<Menu
Trigger={IconButton}
@@ -39,6 +56,13 @@ export const EntryContext = ({
{...tooltip(t("misc.more"))}
{...(props as any)}
>
{account && (
<Menu.Item
label={t("show.watchlistMark.completed")}
icon={watchListIcon("completed")}
onSelect={() => markAsSeenMutation.mutate()}
/>
)}
{serieSlug && (
<Menu.Item
label={t("home.episodeMore.goToShow")}