fix: modal frame
This commit is contained in:
1 parent
9702f027ed
commit
dc8dde4dbb
9 files changed
+17
-23
No files matched your search
@@ -40,7 +40,7 @@ const showPlayer = create(({ onResolve, magnet, backdrop, title }: Props) => {
|
||||
}
|
||||
|
||||
return (
|
||||
<Modal className='max-w-[932px] overflow-hidden border-none bg-black p-0' onClose={onResolve}>
|
||||
<Modal className='overflow-hidden border-none bg-black p-0' onClose={onResolve}>
|
||||
<div className='relative w-full overflow-hidden pt-[56.25%]'>
|
||||
<div className='absolute left-0 top-0 size-full'>
|
||||
<Player subtitles={subtitles} videos={videos} onReady={() => setIsReady(true)} />
|
||||
|
||||
@@ -84,7 +84,7 @@ const TorrentsTable: FC<Props> = ({ title, torrents, backdrop, sort, sortable, p
|
||||
<div className='no-scrollbar flex max-w-full justify-end gap-2 overflow-auto'>
|
||||
{supportedForStream && (
|
||||
<div
|
||||
className='flex size-8 cursor-pointer items-center justify-center rounded-xl border'
|
||||
className='flex size-8 cursor-pointer items-center justify-center rounded-md border'
|
||||
onClick={() => showPlayer({ magnet: torrent.magnet, backdrop, title })}
|
||||
title='Play show'
|
||||
>
|
||||
@@ -95,20 +95,20 @@ const TorrentsTable: FC<Props> = ({ title, torrents, backdrop, sort, sortable, p
|
||||
href={`${process.env.NEXT_PUBLIC_TORRENT_PROXY}/stream?m3u&link=${encodeURIComponent(
|
||||
torrent.magnet
|
||||
)}`}
|
||||
className='flex size-8 items-center justify-center rounded-xl border'
|
||||
className='flex size-8 items-center justify-center rounded-md border'
|
||||
title='Open using you native video player'
|
||||
>
|
||||
<ListVideo size={20} />
|
||||
</a>
|
||||
<a
|
||||
href={torrent.magnet}
|
||||
className='flex size-8 items-center justify-center rounded-xl border'
|
||||
className='flex size-8 items-center justify-center rounded-md border'
|
||||
title='Download magnet'
|
||||
>
|
||||
<Magnet size={20} />
|
||||
</a>
|
||||
<div
|
||||
className='flex size-8 cursor-pointer items-center justify-center rounded-xl border'
|
||||
className='flex size-8 cursor-pointer items-center justify-center rounded-md border'
|
||||
onClick={() => navigator.clipboard.writeText(torrent.magnet)}
|
||||
title='Copy magnet into clipboard'
|
||||
>
|
||||
@@ -117,7 +117,7 @@ const TorrentsTable: FC<Props> = ({ title, torrents, backdrop, sort, sortable, p
|
||||
{supportedForCast && (
|
||||
<div
|
||||
onClick={() => cast(torrent.magnet!)}
|
||||
className='flex size-8 cursor-pointer items-center justify-center rounded-xl border'
|
||||
className='flex size-8 cursor-pointer items-center justify-center rounded-md border'
|
||||
>
|
||||
<Cast size={20} />
|
||||
</div>
|
||||
|
||||
@@ -31,18 +31,12 @@ const Preview: FC<Props> = ({ show: baseShow, className, onClose, poster }) => {
|
||||
<div
|
||||
className={cn(
|
||||
'flex flex-col md:flex-row gap-2 rounded-xl overflow-hidden',
|
||||
{ 'gap-0 xs:pt-2 md:pt-0 pt-0': isModal },
|
||||
{ 'gap-0 md:p-0 p-2': isModal },
|
||||
className
|
||||
)}
|
||||
>
|
||||
{poster || (
|
||||
<Poster
|
||||
className='mx-auto'
|
||||
rounded='rounded-none rounded-t-xl md:rounded-xl sm:rounded-xl md:rounded-none md:rounded-l-xl'
|
||||
show={show}
|
||||
/>
|
||||
)}
|
||||
<div className={cn('flex grow flex-col bg-background', { 'p-2': isModal })}>
|
||||
{poster || <Poster className='mx-auto' rounded='md:rounded-none md:rounded-l-xl' show={show} />}
|
||||
<div className={cn('flex grow flex-col bg-background', { 'p-0 pt-1 md:p-2': isModal })}>
|
||||
<span className='order-3 mb-4 text-3xl md:order-1 md:line-clamp-2'>{show.title}</span>
|
||||
|
||||
<div className='order-3 mb-4 flex w-full flex-wrap gap-5 whitespace-nowrap text-sm md:order-2'>
|
||||
@@ -70,7 +64,7 @@ const Preview: FC<Props> = ({ show: baseShow, className, onClose, poster }) => {
|
||||
};
|
||||
|
||||
export const showPreviewModal = create(({ onResolve, onClose, show }: Props & InstanceProps<void>) => (
|
||||
<Modal className='block max-w-[932px] bg-black p-0 sm:bg-background md:bg-black' onClose={onResolve}>
|
||||
<Modal className='block bg-background p-0 md:bg-black' onClose={onResolve}>
|
||||
<Preview
|
||||
show={show}
|
||||
onClose={() => {
|
||||
|
||||
Reference in new issue
Block a user