fix: modal frame
This commit is contained in:
1 parent
9702f027ed
commit
dc8dde4dbb
9 files changed
+17
-23
No files matched your search
@@ -7,7 +7,7 @@ const Container = () => (
|
||||
<Random />
|
||||
<div className='h-2 w-full' />
|
||||
</div>
|
||||
<div className='hidden w-full rounded-xl xs:block'>
|
||||
<div className='hidden w-full rounded-lg xs:block'>
|
||||
<Trending />
|
||||
<div className='h-2 w-full' />
|
||||
</div>
|
||||
|
||||
@@ -21,7 +21,7 @@ const showTrailerModal = create(({ trailerKey, onResolve }: { trailerKey?: strin
|
||||
<iframe
|
||||
allowFullScreen
|
||||
allow='autoplay'
|
||||
className='rounded-xl border-none'
|
||||
className='rounded-lg border-none'
|
||||
width='100%'
|
||||
height='100%'
|
||||
src={`//www.youtube.com/embed/${trailerKey}?autoplay=1`}
|
||||
|
||||
@@ -18,10 +18,10 @@ const Poster: FC<Props> = ({ show, onClick, className, rounded, containerProps }
|
||||
return (
|
||||
<div
|
||||
{...(containerProps || {})}
|
||||
className={cn('card-aspect-ratio relative bg-black overflow-hidden rounded-xl text-lg', className, rounded)}
|
||||
className={cn('card-aspect-ratio relative bg-black overflow-hidden rounded-lg text-lg', className, rounded)}
|
||||
>
|
||||
<div className='flex size-full'>
|
||||
<img className={cn('size-full rounded-xl object-cover', rounded)} src={show.poster} alt={show.title} />
|
||||
<img className={cn('size-full rounded-lg object-cover', rounded)} src={show.poster} alt={show.title} />
|
||||
</div>
|
||||
<div
|
||||
className={cn(
|
||||
|
||||
@@ -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={() => {
|
||||
|
||||
@@ -68,7 +68,7 @@ const components: VirtuosoProps<Show, (index: number) => void>['components'] = {
|
||||
<div
|
||||
{...props}
|
||||
ref={handleRef(ref, setRef)}
|
||||
className={cn('no-scrollbar h-full overflow-hidden rounded-xl', {
|
||||
className={cn('no-scrollbar h-full overflow-hidden rounded-lg', {
|
||||
'snap-x snap-mandatory ': !isArrowHovered
|
||||
})}
|
||||
/>
|
||||
|
||||
@@ -13,7 +13,7 @@ const Gallery: FC<Props> = ({ shows }) => (
|
||||
{(setRef) => (
|
||||
<ul
|
||||
ref={setRef}
|
||||
className='no-scrollbar flex animate-fade-aside-slide-in snap-x snap-mandatory gap-2 overflow-auto rounded-xl opacity-0'
|
||||
className='no-scrollbar flex animate-fade-aside-slide-in snap-x snap-mandatory gap-2 overflow-auto rounded-lg opacity-0'
|
||||
>
|
||||
{shows.map((show) => (
|
||||
<li key={show.id} className='snap-start'>
|
||||
|
||||
@@ -102,7 +102,7 @@ const DialogContent = React.forwardRef<
|
||||
|
||||
return (
|
||||
<DialogPortal>
|
||||
<div className='fixed inset-0 z-50 size-full bg-black/65' data-overlay ref={wrapperRef}>
|
||||
<div className='fixed inset-0 z-50 size-full bg-black/80' data-overlay ref={wrapperRef}>
|
||||
<DialogOverlay
|
||||
ref={(element) => {
|
||||
if (!element) return;
|
||||
|
||||
Reference in new issue
Block a user