fix: order of tailwind classes

This commit is contained in:
ner committed 2024-10-05 17:23:37 +03:00
1 parent 5528a84ee7
commit 3b03df3ff5
33 files changed
+135 -1250

No files matched your search

+7 -7
View File
@@ -18,18 +18,18 @@ const Credits: FC<Props> = ({ showId, showType = 'movie', onPersonClick }) => {
return (
Boolean(credits?.length) && (
<ul className='flex gap-2 no-scrollbar overflow-auto rounded-lg snap-mandatory snap-x opacity-0 animate-fade-aside-slide-in'>
<ul className='no-scrollbar flex animate-fade-aside-slide-in snap-x snap-mandatory gap-2 overflow-auto rounded-lg opacity-0'>
{credits?.map((actor) => (
<li
key={`${actor.id}_${actor.cast_id}`}
title={actor.name}
className='bg-card text-card-foreground self-end max-w-[120px] w-full shrink-0 cursor-pointer transition-shadow hover:shadow-lg relative snap-start'
className='relative w-full max-w-[120px] shrink-0 cursor-pointer snap-start self-end bg-card text-card-foreground transition-shadow hover:shadow-lg'
>
<Link
href={`/starring?actorId=${actor.id}&title=${encodeURIComponent(actor.name)}`}
onClick={() => onPersonClick?.(actor.id.toString())}
>
<div className='rounded-lg overflow-hidden'>
<div className='overflow-hidden rounded-lg'>
{actor.profile_path ? (
<Image
unoptimized
@@ -39,15 +39,15 @@ const Credits: FC<Props> = ({ showId, showType = 'movie', onPersonClick }) => {
alt={actor.name}
/>
) : (
<div className='h-[180px] w-[120px] flex items-center justify-center rounded-lg'>
<div className='flex h-[180px] w-[120px] items-center justify-center rounded-lg'>
<User2 size={120} strokeWidth={1} />
</div>
)}
</div>
<div className='text-white text-sm absolute w-full h-full top-0 left-0 rounded-md flex flex-col justify-between p-2 py-1 bg-vignette'>
<p className=' overflow-ellipsis whitespace-nowrap overflow-hidden'>{actor.name}</p>
<div className='absolute left-0 top-0 flex size-full flex-col justify-between rounded-md bg-vignette p-2 py-1 text-sm text-white'>
<p className=' truncate'>{actor.name}</p>
{Boolean(actor.character) && (
<p className='overflow-ellipsis whitespace-nowrap overflow-hidden'>{actor.character}</p>
<p className='truncate'>{actor.character}</p>
)}
</div>
</Link>
@@ -12,7 +12,7 @@ interface Props {
const Handlers: FC<Props> = ({ onClick, show }) => {
const { toggle } = useFavoriteToggle(show);
return <div onClick={onClick} onDoubleClick={toggle} className='absolute top-0 left-0 w-full h-full' />;
return <div onClick={onClick} onDoubleClick={toggle} className='absolute left-0 top-0 size-full' />;
};
export default Handlers;
+2 -2
View File
@@ -8,9 +8,9 @@ interface Props {
const Poster: FC<Props> = ({ title, poster }) => {
return poster ? (
<img className='rounded-lg w-full h-full object-cover' src={poster} alt={title} />
<img className='size-full rounded-lg object-cover' src={poster} alt={title} />
) : (
<div className='w-full flex items-center justify-center rounded-lg grow'>
<div className='flex w-full grow items-center justify-center rounded-lg'>
<ImageOff size={100} strokeWidth={1} color='hsl(215.4 16.3% 46.9%)' />
</div>
);
@@ -9,7 +9,7 @@ const showHostManagerModal = create<InstanceProps<string>>(({ onResolve, onRejec
const setPrefix = useSetPrefix();
return (
<Modal className='p-2 max-w-[200px] m-auto' onClose={onReject}>
<Modal className='m-auto max-w-[200px] p-2' onClose={onReject}>
<Input
autoFocus
placeholder='Enter address of your torrents streamer'
@@ -37,7 +37,7 @@ const showPlayer = create(({ onResolve, magnet, backdrop }: Props) => {
return (
<Modal
className='p-0 border-none rounded-lg overflow-hidden flex items-center justify-center relative'
className='relative flex items-center justify-center overflow-hidden rounded-lg border-none p-0'
style={{ aspectRatio: '16/9' }}
onClose={onResolve}
>
@@ -62,7 +62,7 @@ const showPlayer = create(({ onResolve, magnet, backdrop }: Props) => {
</Player>
{isLoading && (
<>
<div className='w-full h-full left-0 top-0 absolute flex items-center justify-center bg-black/70'>
<div className='absolute left-0 top-0 flex size-full items-center justify-center bg-black/70'>
<div className='animate-spin'>
<Loader color='white' />
</div>
@@ -19,10 +19,10 @@ const TableHeadSortable: FC<Props> = ({ title, sort, value, sortable, onChange }
return (
<TableHead onClick={handleSort} className={cn('select-none px-2', sortable && 'cursor-pointer')}>
<div className='flex gap-1 items-center'>
<div className='flex items-center gap-1'>
<span>{title}</span>
{sortable &&
(sort === value ? <ArrowDownIcon className='ml-2 h-4 w-4' /> : <CaretSortIcon className='ml-2 h-4 w-4' />)}
(sort === value ? <ArrowDownIcon className='ml-2 size-4' /> : <CaretSortIcon className='ml-2 size-4' />)}
</div>
</TableHead>
);
+12 -12
View File
@@ -49,12 +49,12 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
return (
<Modal className='p-0' onClose={onResolve}>
<Table className='rounded-xl overflow-hidden'>
<Table className='overflow-hidden rounded-xl'>
<TableHeader>
<TableRow className='!border-b-0'>
<TableHead className='px-2' colSpan={4}>
<div className='grid grid-cols-[1fr_auto] items-center gap-3'>
<span className='overflow-ellipsis overflow-hidden text-base whitespace-nowrap'>{title}</span>
<span className='truncate text-base'>{title}</span>
<Button
className='h-6 p-2'
variant={withYear ? 'default' : 'ghost'}
@@ -82,7 +82,7 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
{!isMobile && <TableHead className='px-2'>Title</TableHead>}
<TableHeadSortable sortable={sortable} title='Size' sort={Sort.size} value={sort} onChange={setSort} />
<TableHeadSortable sortable={sortable} title='Seeders' sort={Sort.seeds} value={sort} onChange={setSort} />
<TableHead className='px-2 cursor-pointer select-none' onClick={() => showHostManagerModal()} />
<TableHead className='cursor-pointer select-none px-2' onClick={() => showHostManagerModal()} />
</TableRow>
</TableHeader>
<TableBody>
@@ -102,24 +102,24 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
</TableCell>
)}
<TableCell className='p-2'>
<div className='flex items-center gap-1 shrink-0'>{torrent.size}</div>
<div className='flex shrink-0 items-center gap-1'>{torrent.size}</div>
</TableCell>
<TableCell className='p-2'>{torrent.seeders}</TableCell>
<TableCell className='text-center p-1 pr-2'>
<div className='flex gap-2 justify-end'>
<TableCell className='p-1 pr-2 text-center'>
<div className='flex justify-end gap-2'>
{Boolean(key === providers.yts.key && torrent.seeders) && (
<div
className='flex items-center justify-center h-8 w-8 border rounded-lg cursor-pointer'
className='flex size-8 cursor-pointer items-center justify-center rounded-lg border'
onClick={() => showPlayer({ magnet: torrent.magnet, backdrop })}
>
<Play size={20} />
</div>
)}
<a href={torrent.magnet} className='flex items-center justify-center h-8 w-8 border rounded-lg'>
<a href={torrent.magnet} className='flex size-8 items-center justify-center rounded-lg border'>
<Magnet size={20} />
</a>
<div
className='flex items-center justify-center h-8 w-8 border rounded-lg cursor-pointer'
className='flex size-8 cursor-pointer items-center justify-center rounded-lg border'
onClick={() => navigator.clipboard.writeText(torrent.magnet)}
>
<Copy size={20} />
@@ -127,7 +127,7 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
{prefix && !prefix.includes('{host}') && (
<div
onClick={() => cast(torrent.magnet!)}
className='flex items-center justify-center h-8 w-8 border rounded-lg cursor-pointer'
className='flex size-8 cursor-pointer items-center justify-center rounded-lg border'
>
<Cast size={20} />
</div>
@@ -140,7 +140,7 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
{isLoading && (
<TableRow>
<TableCell colSpan={4}>
<div className='h-40 w-full flex items-center justify-center'>
<div className='flex h-40 w-full items-center justify-center'>
<Loader className='animate-spin' />
</div>
</TableCell>
@@ -149,7 +149,7 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
{!isLoading && isFetched && !torrents?.length && (
<TableRow>
<TableCell colSpan={4}>
<div className='h-40 w-full flex items-center justify-center text-xl text-muted-foreground'>
<div className='flex h-40 w-full items-center justify-center text-xl text-muted-foreground'>
Nothing was found
</div>
</TableCell>
+2 -2
View File
@@ -17,11 +17,11 @@ const showTrailerModal = create(({ trailerKey, onResolve }: { trailerKey?: strin
if (!trailerKey) return;
return (
<Modal className='block p-0 max-w-[930px] border-none bg-black' style={{ aspectRatio: '16/9' }} onClose={onResolve}>
<Modal className='block max-w-[930px] border-none bg-black p-0' style={{ aspectRatio: '16/9' }} onClose={onResolve}>
<iframe
allowFullScreen
allow='autoplay'
className='border-none rounded-lg'
className='rounded-lg border-none'
width='100%'
height='100%'
src={`//www.youtube.com/embed/${trailerKey}?autoplay=1`}
+6 -6
View File
@@ -25,17 +25,17 @@ const Show: FC<Props> = ({ show, onClick, className, containerProps }) => {
className
)}
>
<div className='flex w-full h-full'>
<div className='flex size-full'>
<Poster title={show.title} poster={show.poster} />
</div>
<div className='text-white absolute w-full h-full top-0 left-0 rounded-md flex flex-col justify-between p-2 bg-vignette'>
<div className='absolute left-0 top-0 flex size-full flex-col justify-between rounded-md bg-vignette p-2 text-white'>
<Handlers show={show} onClick={onClick} />
<div className='grid grid-cols-[1fr_auto] opacity-75 gap-2'>
<span className='overflow-ellipsis overflow-hidden whitespace-nowrap'>{show.title}</span>
<div className='grid grid-cols-[1fr_auto] gap-2 opacity-75'>
<span className='truncate'>{show.title}</span>
{Boolean(show.release) && <span>{new Date(show.release).getFullYear()}</span>}
</div>
<div className='opacity-75 mb-[-5px]'>
<span className='select-none flex w-full items-center ml-auto gap-1 mt-[-8px] justify-between z-[1]'>
<div className='mb-[-5px] opacity-75'>
<span className='z-[1] ml-auto mt-[-8px] flex w-full select-none items-center justify-between gap-1'>
<Favorite show={show} />
<Rating rating={show.rating} />
</span>