mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-19 13:36:09 +05:00
refactor
This commit is contained in:
@@ -17,6 +17,7 @@ import ptt from 'parse-torrent-title'
|
|||||||
import { useTranslation } from 'react-i18next'
|
import { useTranslation } from 'react-i18next'
|
||||||
import AddDialog from 'components/Add/AddDialog'
|
import AddDialog from 'components/Add/AddDialog'
|
||||||
import { StyledDialog } from 'style/CustomMaterialUiStyles'
|
import { StyledDialog } from 'style/CustomMaterialUiStyles'
|
||||||
|
import useOnStandaloneAppOutsideClick from 'utils/useOnStandaloneAppOutsideClick'
|
||||||
|
|
||||||
import { StyledButton, TorrentCard, TorrentCardButtons, TorrentCardDescription, TorrentCardPoster } from './style'
|
import { StyledButton, TorrentCard, TorrentCardButtons, TorrentCardDescription, TorrentCardPoster } from './style'
|
||||||
|
|
||||||
@@ -62,6 +63,8 @@ const Torrent = ({ torrent }) => {
|
|||||||
|
|
||||||
const fullPlaylistLink = `${playlistTorrHost()}/${encodeURIComponent(parsedTitle || 'file')}.m3u?link=${hash}&m3u`
|
const fullPlaylistLink = `${playlistTorrHost()}/${encodeURIComponent(parsedTitle || 'file')}.m3u?link=${hash}&m3u`
|
||||||
|
|
||||||
|
const detailedInfoDialogRef = useOnStandaloneAppOutsideClick(closeDetailedInfo)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<TorrentCard>
|
<TorrentCard>
|
||||||
@@ -129,6 +132,7 @@ const Torrent = ({ torrent }) => {
|
|||||||
fullWidth
|
fullWidth
|
||||||
maxWidth='xl'
|
maxWidth='xl'
|
||||||
TransitionComponent={Transition}
|
TransitionComponent={Transition}
|
||||||
|
ref={detailedInfoDialogRef}
|
||||||
>
|
>
|
||||||
<DialogTorrentDetailsContent closeDialog={closeDetailedInfo} torrent={torrent} />
|
<DialogTorrentDetailsContent closeDialog={closeDetailedInfo} torrent={torrent} />
|
||||||
</StyledDialog>
|
</StyledDialog>
|
||||||
|
|||||||
Reference in New Issue
Block a user