mirror of
https://github.com/zoriya/Kyoo.git
synced 2025-05-24 02:02:36 -04:00
Fix weird menus click via a weird hack
This commit is contained in:
parent
10924e2410
commit
c67a11b8b6
@ -32,7 +32,7 @@ export const EpisodesContext = ({
|
||||
slug,
|
||||
status,
|
||||
...props
|
||||
}: { showSlug?: string; slug: string; status: WatchStatusV | null } & Partial<
|
||||
}: { showSlug?: string | null; slug: string; status: WatchStatusV | null } & Partial<
|
||||
ComponentProps<typeof Menu<typeof IconButton>>
|
||||
>) => {
|
||||
const account = useAccount();
|
||||
@ -50,11 +50,6 @@ export const EpisodesContext = ({
|
||||
|
||||
return (
|
||||
<Menu Trigger={IconButton} icon={MoreVert} {...tooltip(t("misc.more"))} {...(props as any)}>
|
||||
<Menu.Item
|
||||
label={t("home.episodeMore.goToShow")}
|
||||
icon={Info}
|
||||
onSelect={() => console.log("tot")}
|
||||
/>
|
||||
{showSlug && (
|
||||
<Menu.Item label={t("home.episodeMore.goToShow")} icon={Info} href={`/show/${showSlug}`} />
|
||||
)}
|
||||
|
@ -158,11 +158,13 @@ export const EpisodeLine = ({
|
||||
runtime,
|
||||
watchedPercent,
|
||||
watchedStatus,
|
||||
href,
|
||||
...props
|
||||
}: WithLoading<{
|
||||
id: string;
|
||||
slug: string;
|
||||
showSlug: string;
|
||||
// if show slug is null, disable "Go to show" in the context menu
|
||||
showSlug: string | null;
|
||||
displayNumber: string;
|
||||
name: string | null;
|
||||
overview: string | null;
|
||||
@ -174,6 +176,7 @@ export const EpisodeLine = ({
|
||||
runtime: number | null;
|
||||
watchedPercent: number | null;
|
||||
watchedStatus: WatchStatusV | null;
|
||||
href: string;
|
||||
}> &
|
||||
Partial<PressableProps>) => {
|
||||
const [moreOpened, setMoreOpened] = useState(false);
|
||||
@ -182,7 +185,7 @@ export const EpisodeLine = ({
|
||||
|
||||
return (
|
||||
<Link
|
||||
href={slug ? `/watch/${slug}` : ""}
|
||||
href={moreOpened ? undefined : href}
|
||||
onLongPress={() => setMoreOpened(true)}
|
||||
{...css(
|
||||
{
|
||||
|
@ -147,6 +147,7 @@ export const EpisodeList = <Props,>({
|
||||
)}
|
||||
<EpisodeLine
|
||||
{...item}
|
||||
showSlug={null}
|
||||
displayNumber={item.isLoading ? undefined! : episodeDisplayNumber(item)!}
|
||||
watchedPercent={item.watchStatus?.watchedPercent ?? null}
|
||||
watchedStatus={item.watchStatus?.status ?? null}
|
||||
|
@ -75,6 +75,7 @@ export const ShowWatchStatusCard = ({ watchedPercent, status, nextEpisode }: Sho
|
||||
<EpisodeLine
|
||||
isLoading={false}
|
||||
{...nextEpisode}
|
||||
showSlug={null}
|
||||
watchedPercent={watchedPercent || null}
|
||||
watchedStatus={status || null}
|
||||
displayNumber={episodeDisplayNumber(nextEpisode, "???")!}
|
||||
|
Loading…
x
Reference in New Issue
Block a user