From a9e054ee54cd197f496fef3f09304d35926d531b Mon Sep 17 00:00:00 2001 From: Zoe Roux Date: Sat, 4 Apr 2026 11:33:32 +0200 Subject: [PATCH] Properly display unavailable box-entries --- front/src/components/entries/entry-box.tsx | 8 ++++++-- front/src/components/items/context-menus.tsx | 14 +++++++------- front/src/ui/home/news.tsx | 2 +- front/src/ui/home/nextup.tsx | 2 +- front/src/ui/profile/index.tsx | 2 +- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/front/src/components/entries/entry-box.tsx b/front/src/components/entries/entry-box.tsx index 4666a43d..a22de70b 100644 --- a/front/src/components/entries/entry-box.tsx +++ b/front/src/components/entries/entry-box.tsx @@ -36,7 +36,7 @@ export const EntryBox = ({ serieSlug: string | null; name: string | null; description: string | null; - href: string; + href: string | null; thumbnail: KImage | null; watchedPercent: number; videos: Entry["videos"]; @@ -51,7 +51,11 @@ export const EntryBox = ({ href={moreOpened || videos.length > 1 ? undefined : href} onPress={videos.length > 1 ? onSelectVideos : undefined} onLongPress={() => setMoreOpened(true)} - className={cn("group w-[350px] items-center p-1 outline-0", className)} + className={cn( + "group w-[350px] items-center p-1 outline-0", + href === null && "opacity-50", + className, + )} {...props} > - {account && ( - markAsSeenMutation.mutate()} - /> - )} {serieSlug && ( )} + {account && ( + markAsSeenMutation.mutate()} + /> + )} {/* { name={`${item.show!.name} ${entryDisplayNumber(item)}`} description={item.name} thumbnail={item.thumbnail ?? item.show!.thumbnail} - href={item.href ?? "#"} + href={item.href} watchedPercent={item.progress.percent} videos={item.videos} onSelectVideos={() => diff --git a/front/src/ui/home/nextup.tsx b/front/src/ui/home/nextup.tsx index e961ffa0..5b2211ae 100644 --- a/front/src/ui/home/nextup.tsx +++ b/front/src/ui/home/nextup.tsx @@ -66,7 +66,7 @@ export const NextupList = () => { name={`${item.show!.name} ${entryDisplayNumber(item)}`} description={item.name} thumbnail={item.thumbnail ?? item.show!.thumbnail} - href={item.href ?? "#"} + href={item.href} watchedPercent={item.progress.percent} videos={item.videos} onSelectVideos={() => diff --git a/front/src/ui/profile/index.tsx b/front/src/ui/profile/index.tsx index efd2e988..da5e6c80 100644 --- a/front/src/ui/profile/index.tsx +++ b/front/src/ui/profile/index.tsx @@ -103,7 +103,7 @@ const ProfileHeader = ({ } description={item.name} thumbnail={item.thumbnail ?? item.show?.thumbnail ?? null} - href={item.href ?? "#"} + href={item.href} watchedPercent={item.progress.percent} videos={item.videos} onSelectVideos={() => {}}