From ff4a3cef1b519611c480ca5d04fe0d6626f342f0 Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Mon, 6 Jan 2025 20:30:53 +0200 Subject: [PATCH 01/10] refactor(Cell): Make posters visible on more ss --- src/routes/Calendar/Table/Cell/Cell.less | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/routes/Calendar/Table/Cell/Cell.less b/src/routes/Calendar/Table/Cell/Cell.less index a5c79e178..154015798 100644 --- a/src/routes/Calendar/Table/Cell/Cell.less +++ b/src/routes/Calendar/Table/Cell/Cell.less @@ -134,7 +134,7 @@ } } -@media only screen and (orientation: portrait) { +@media only screen and (max-height: @xxsmall) and (orientation: portrait) { .cell { .heading { justify-content: center; @@ -150,23 +150,11 @@ } } -@media only screen and (max-width: @small) and (orientation: landscape) { +@media only screen and (max-height: @xxsmall) and (orientation: landscape) { .cell { flex-direction: row; align-items: center; - .items { - display: none; - } - - .more { - display: flex; - } - } -} - -@media only screen and (max-height: @xxsmall) and (orientation: landscape) { - .cell { .items { display: none; } From 0148024d835ac26820a8b3509fb94d044994b5f0 Mon Sep 17 00:00:00 2001 From: "Timothy Z." Date: Mon, 6 Jan 2025 20:49:16 +0200 Subject: [PATCH 02/10] fix(Cell): stopPropagation when clicking on poster --- src/routes/Calendar/Table/Cell/Cell.less | 10 ++++++++++ src/routes/Calendar/Table/Cell/Cell.tsx | 8 ++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/routes/Calendar/Table/Cell/Cell.less b/src/routes/Calendar/Table/Cell/Cell.less index 154015798..ea2e42391 100644 --- a/src/routes/Calendar/Table/Cell/Cell.less +++ b/src/routes/Calendar/Table/Cell/Cell.less @@ -164,3 +164,13 @@ } } } + +@media only screen and (max-height: @xsmall) and (max-width: @xsmall) { + .cell { + .items { + .item { + pointer-events: none; + } + } + } +} \ No newline at end of file diff --git a/src/routes/Calendar/Table/Cell/Cell.tsx b/src/routes/Calendar/Table/Cell/Cell.tsx index 715ee46f7..2db1b0992 100644 --- a/src/routes/Calendar/Table/Cell/Cell.tsx +++ b/src/routes/Calendar/Table/Cell/Cell.tsx @@ -1,6 +1,6 @@ // Copyright (C) 2017-2024 Smart code 203358507 -import React, { useMemo } from 'react'; +import React, { useCallback, useMemo, MouseEvent } from 'react'; import Icon from '@stremio/stremio-icons/react'; import classNames from 'classnames'; import { Button, HorizontalScroll, Image } from 'stremio/components'; @@ -24,6 +24,10 @@ const Cell = ({ selected, monthInfo, date, items, onClick }: Props) => { onClick && onClick(date); }; + const onPosterClick = useCallback((event: MouseEvent) => { + event.stopPropagation(); + }, []); + return (