feat(torrents): launched state, year-scoped Toloka search, stacked modal backdrops

- replace pin-to-top with persistent launched-once state (filled play/cast icons)
- move download/vlc actions into a more-options dropdown when cast is available
- scope Toloka search query by show year (no IMDB filter on the tracker)
- strip session sid from Toloka download hrefs so cached magnets stay valid
- restore row hover, subtle row borders, taller rows; drop table rounding
- stacked modal backdrops: :has(~ [data-overlay]) instead of :not(:last-of-type)
- only count search in analytics after the query has settled (1s debounce)
This commit is contained in:
ner committed 2026-09-13 14:06:27 +03:00
1 parent 66776c582f
commit c52d798221
12 files changed
+194 -107

No files matched your search

@@ -21,9 +21,11 @@ export const showSearchModal = create(({ onResolve }) => {
const isFetchedRef = useRef(false);
const query = useDistinctUntilChanged(title);
const settledTitle = useDistinctUntilChanged(title, 1000);
const settled = title === settledTitle;
const movies = useSearch({ query, type: 'movie' });
const series = useSearch({ query, type: 'tv' });
const movies = useSearch({ query, type: 'movie', settled });
const series = useSearch({ query, type: 'tv', settled });
const handleChangeTitle = ({ target: { value } }: ChangeEvent<HTMLInputElement>) => setTitle(value);
@@ -5,14 +5,14 @@ import useInfiniteList from '@/hooks/useInfiniteList';
import analytics from '@/lib/analytics';
import useTrackOnce from '@/lib/analytics/useTrackOnce';
const useSearch = (props: SearchQueryProps) => {
const useSearch = (props: SearchQueryProps & { settled: boolean }) => {
const previousRef = useRef<Show[]>([]);
const infiniteQuery = useInfiniteList({ ...searchQuery(props), mode: 'default', list: 'search' });
useTrackOnce(
analytics.searchPerformed,
props.query && infiniteQuery.isFetched ? `${props.type}:${props.query}` : undefined,
props.query && props.settled && infiniteQuery.isFetched ? `${props.type}:${props.query}` : undefined,
() => ({ query: props.query, showType: props.type, results: infiniteQuery.shows.length })
);