From 526f0c24e0e4b3c2c79dfbdc52ddbef6600cc9ff Mon Sep 17 00:00:00 2001 From: ner Date: Fri, 7 Aug 2026 00:30:00 +0300 Subject: [PATCH] refactor(torrents): move pin into row actions Move the pin toggle out of the title cell into the row's action buttons (next to play) and drop the hover-reveal animation, so the title column stays clean. Co-Authored-By: Claude Fable 5 --- .../components/Actions/index.tsx | 12 ++++- .../components/TorrentsTable/index.tsx | 48 ++++--------------- 2 files changed, 19 insertions(+), 41 deletions(-) diff --git a/components/Preview/components/Torrents/components/TorrentsTable/components/Actions/index.tsx b/components/Preview/components/Torrents/components/TorrentsTable/components/Actions/index.tsx index 0839a8e..6c3a126 100644 --- a/components/Preview/components/Torrents/components/TorrentsTable/components/Actions/index.tsx +++ b/components/Preview/components/Torrents/components/TorrentsTable/components/Actions/index.tsx @@ -1,5 +1,5 @@ import { FC, useEffect, useMemo, useState } from 'react'; -import { Cast, Download, ListVideo, Loader, Magnet, Play, TrafficCone } from 'lucide-react'; +import { Bookmark, Cast, Download, ListVideo, Loader, Magnet, Play, TrafficCone } from 'lucide-react'; import { providers } from '@/components/Preview/components/Torrents/constants'; import { useCastMagnet, usePrefix } from '@/components/Preview/components/Torrents/hooks/useMagnetHosts'; @@ -45,7 +45,7 @@ const Actions: FC = ({ torrent, title, provider, show }) => { const fetchMagnet = useMagnet(torrent); - const { pin, isPinned, savedMagnet, rememberMagnet } = usePinnedTorrents(); + const { pin, toggle, isPinned, savedMagnet, rememberMagnet } = usePinnedTorrents(); const key = torrentKey(torrent); const pinned = isPinned(key); @@ -115,6 +115,14 @@ const Actions: FC = ({ torrent, title, provider, show }) => { )} + - ); - }; - // server sort (size/seeds) refetches in a new order, so drop the client-side S:E sort const handleChangeSort = (next: Sort) => { setEpisodesSort(null); @@ -128,22 +104,16 @@ const TorrentsTable: FC = ({ title, torrents, show, sort, sortable, provi return ( - - - {renderPin(torrent, true)} - - {torrent.title} {isSeries && torrent.episodes && `[${torrent.episodes}]`}{' '} - {torrent.quality && `[${torrent.quality}]`} - + + + {torrent.title} {isSeries && torrent.episodes && `[${torrent.episodes}]`}{' '} + {torrent.quality && `[${torrent.quality}]`} - + - - {renderPin(torrent)} - {torrent.title} - + {torrent.title} {isSeries && (