fix: order of tailwind classes
This commit is contained in:
1 parent
5528a84ee7
commit
3b03df3ff5
33 files changed
+135
-1250
No files matched your search
+16
-38
@@ -1,54 +1,32 @@
|
|||||||
{
|
{
|
||||||
"extends": "next/core-web-vitals",
|
"extends": ["next/core-web-vitals", "plugin:tailwindcss/recommended"],
|
||||||
"plugins": [
|
"plugins": ["simple-import-sort", "tailwindcss"],
|
||||||
"simple-import-sort"
|
|
||||||
],
|
|
||||||
"rules": {
|
"rules": {
|
||||||
|
"tailwindcss/classnames-order": "error",
|
||||||
"simple-import-sort/imports": "error",
|
"simple-import-sort/imports": "error",
|
||||||
"simple-import-sort/exports": "error",
|
"simple-import-sort/exports": "error",
|
||||||
"quotes": ["error", "single"]
|
"quotes": ["error", "single"]
|
||||||
},
|
},
|
||||||
|
"settings": {
|
||||||
|
"tailwindcss": {
|
||||||
|
// Tailwind config path, relative to the project root
|
||||||
|
"config": "./tailwind.config.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
"overrides": [
|
"overrides": [
|
||||||
{
|
{
|
||||||
"files": [
|
"files": ["*.js", "*.jsx", "*.ts", "*.tsx"],
|
||||||
"*.js",
|
|
||||||
"*.jsx",
|
|
||||||
"*.ts",
|
|
||||||
"*.tsx"
|
|
||||||
],
|
|
||||||
"rules": {
|
"rules": {
|
||||||
"simple-import-sort/imports": [
|
"simple-import-sort/imports": [
|
||||||
"error",
|
"error",
|
||||||
{
|
{
|
||||||
"groups": [
|
"groups": [
|
||||||
// Packages `react` related packages come first.
|
["^react", "^@?\\w"],
|
||||||
[
|
["^(@|components)(/.*|$)"],
|
||||||
"^react",
|
["^\\u0000"],
|
||||||
"^@?\\w"
|
["^\\.\\.(?!/?$)", "^\\.\\./?$"],
|
||||||
],
|
["^\\./(?=.*/)(?!/?$)", "^\\.(?!/?$)", "^\\./?$"],
|
||||||
// Internal packages.
|
["^.+\\.?(css)$"]
|
||||||
[
|
|
||||||
"^(@|components)(/.*|$)"
|
|
||||||
],
|
|
||||||
// Side effect imports.
|
|
||||||
[
|
|
||||||
"^\\u0000"
|
|
||||||
],
|
|
||||||
// Parent imports. Put `..` last.
|
|
||||||
[
|
|
||||||
"^\\.\\.(?!/?$)",
|
|
||||||
"^\\.\\./?$"
|
|
||||||
],
|
|
||||||
// Other relative imports. Put same-folder imports and `.` last.
|
|
||||||
[
|
|
||||||
"^\\./(?=.*/)(?!/?$)",
|
|
||||||
"^\\.(?!/?$)",
|
|
||||||
"^\\./?$"
|
|
||||||
],
|
|
||||||
// Style imports.
|
|
||||||
[
|
|
||||||
"^.+\\.?(css)$"
|
|
||||||
]
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -2,14 +2,14 @@ import Random from '@/components/Random';
|
|||||||
import Trending from '@/components/Trending';
|
import Trending from '@/components/Trending';
|
||||||
|
|
||||||
const Container = () => (
|
const Container = () => (
|
||||||
<div className='flex flex-col flex-1'>
|
<div className='flex flex-1 flex-col'>
|
||||||
<div className='xs:mb-4'>
|
<div className='xs:mb-4'>
|
||||||
<Random />
|
<Random />
|
||||||
<div className='w-full h-2' />
|
<div className='h-2 w-full' />
|
||||||
</div>
|
</div>
|
||||||
<div className='xs:block hidden w-full rounded-lg'>
|
<div className='hidden w-full rounded-lg xs:block'>
|
||||||
<Trending />
|
<Trending />
|
||||||
<div className='w-full h-2' />
|
<div className='h-2 w-full' />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ export default function Container() {
|
|||||||
|
|
||||||
if (!shows.length)
|
if (!shows.length)
|
||||||
return (
|
return (
|
||||||
<div className='h-40 w-full flex items-center text-center justify-center text-xl text-muted-foreground'>
|
<div className='flex h-40 w-full items-center justify-center text-center text-xl text-muted-foreground'>
|
||||||
There are no items in your favorites list
|
There are no items in your favorites list
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import { Loader } from 'lucide-react';
|
import { Loader } from 'lucide-react';
|
||||||
|
|
||||||
const Loading = () => (
|
const Loading = () => (
|
||||||
<div className='w-full min-h-[70vh] flex items-center justify-center'>
|
<div className='flex min-h-[70vh] w-full items-center justify-center'>
|
||||||
<div className='animate-spin'>
|
<div className='animate-spin'>
|
||||||
<Loader />
|
<Loader />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ const Container = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{Boolean(title) && (
|
{Boolean(title) && (
|
||||||
<span className='inline-flex w-full h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground mb-2'>
|
<span className='mb-2 inline-flex h-10 w-full items-center justify-center rounded-md bg-muted p-1 text-muted-foreground'>
|
||||||
Similar: {decodeURIComponent(title)}
|
Similar: {decodeURIComponent(title)}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ const Container = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{Boolean(title) && (
|
{Boolean(title) && (
|
||||||
<span className='inline-flex w-full h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground mb-2'>
|
<span className='mb-2 inline-flex h-10 w-full items-center justify-center rounded-md bg-muted p-1 text-muted-foreground'>
|
||||||
Starring: {decodeURIComponent(title || '')}
|
Starring: {decodeURIComponent(title || '')}
|
||||||
</span>
|
</span>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -22,12 +22,12 @@ export const MobileNavigation = () => {
|
|||||||
<Menu size={19} />
|
<Menu size={19} />
|
||||||
</Button>
|
</Button>
|
||||||
</DropdownMenuTrigger>
|
</DropdownMenuTrigger>
|
||||||
<DropdownMenuContent className='w-44 flex flex-col gap-2 p-2'>
|
<DropdownMenuContent className='flex w-44 flex-col gap-2 p-2'>
|
||||||
{paths.map(({ path, title }) => (
|
{paths.map(({ path, title }) => (
|
||||||
<DropdownMenuItem key={path} asChild>
|
<DropdownMenuItem key={path} asChild>
|
||||||
<Link href={path}>
|
<Link href={path}>
|
||||||
<div>
|
<div>
|
||||||
<Button className='w-full relative' variant={currentPath === path ? 'default' : 'outline'}>
|
<Button className='relative w-full' variant={currentPath === path ? 'default' : 'outline'}>
|
||||||
{title}
|
{title}
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ export const showSearchModal = create(({ onResolve }) => {
|
|||||||
const isFetched = movies.isFetched && series.isFetched;
|
const isFetched = movies.isFetched && series.isFetched;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal className='block p-0 max-w-[932px]' onClose={onResolve} scrollRef={scrollRef}>
|
<Modal className='block max-w-[932px] p-0' onClose={onResolve} scrollRef={scrollRef}>
|
||||||
<div className='relative p-2'>
|
<div className='relative p-2'>
|
||||||
<Input
|
<Input
|
||||||
autoFocus
|
autoFocus
|
||||||
|
|||||||
@@ -8,11 +8,11 @@ import ToggleSearch from './components/Search';
|
|||||||
import ToggleTheme from './components/ThemeToggle';
|
import ToggleTheme from './components/ThemeToggle';
|
||||||
|
|
||||||
const Header: FC = () => (
|
const Header: FC = () => (
|
||||||
<header className='flex justify-center bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60 py-2'>
|
<header className='flex justify-center bg-background/95 py-2 backdrop-blur supports-[backdrop-filter]:bg-background/60'>
|
||||||
<div className='container'>
|
<div className='container'>
|
||||||
<div className='flex items-center justify-between gap-2 xs:flex-nowrap'>
|
<div className='flex items-center justify-between gap-2 xs:flex-nowrap'>
|
||||||
<Link shallow href='/'>
|
<Link shallow href='/'>
|
||||||
<Badge className='whitespace-nowrap cursor-pointer font-normal'>Movie advisor</Badge>
|
<Badge className='cursor-pointer whitespace-nowrap font-normal'>Movie advisor</Badge>
|
||||||
</Link>
|
</Link>
|
||||||
<DesktopNavigation />
|
<DesktopNavigation />
|
||||||
<div className='flex items-center gap-2'>
|
<div className='flex items-center gap-2'>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
const NoResults = () => (
|
const NoResults = () => (
|
||||||
<div className='h-40 w-full flex items-center justify-center text-xl text-muted-foreground'>Nothing was found</div>
|
<div className='flex h-40 w-full items-center justify-center text-xl text-muted-foreground'>Nothing was found</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
export default NoResults;
|
export default NoResults;
|
||||||
@@ -15,13 +15,13 @@ const Actions = ({ onClose, show }: Props) => (
|
|||||||
<>
|
<>
|
||||||
<ToggleTrailer showType={show.type} showId={show.id}>
|
<ToggleTrailer showType={show.type} showId={show.id}>
|
||||||
{({ onPlay, disabled }) => (
|
{({ onPlay, disabled }) => (
|
||||||
<Button className='h-8 flex-grow w-[50%]' onClick={onPlay} disabled={disabled}>
|
<Button className='h-8 w-1/2 grow' onClick={onPlay} disabled={disabled}>
|
||||||
Trailer
|
Trailer
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</ToggleTrailer>
|
</ToggleTrailer>
|
||||||
<Button
|
<Button
|
||||||
className='h-8 flex-grow w-[50%]'
|
className='h-8 w-1/2 grow'
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
showTorrentsModal({
|
showTorrentsModal({
|
||||||
showId: show.id,
|
showId: show.id,
|
||||||
@@ -35,11 +35,11 @@ const Actions = ({ onClose, show }: Props) => (
|
|||||||
Torrents
|
Torrents
|
||||||
</Button>
|
</Button>
|
||||||
<Link
|
<Link
|
||||||
className='flex w-[50%]'
|
className='flex w-1/2'
|
||||||
href={`/similar?id=${show.id}&title=${encodeURIComponent(show.title)}&type=${show.type}`}
|
href={`/similar?id=${show.id}&title=${encodeURIComponent(show.title)}&type=${show.type}`}
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
>
|
>
|
||||||
<Button className='h-8 flex-grow'>Similar</Button>
|
<Button className='h-8 grow'>Similar</Button>
|
||||||
</Link>
|
</Link>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -25,13 +25,13 @@ const Preview: FC<Props> = ({ show, className, onClose, children, card }) => {
|
|||||||
return (
|
return (
|
||||||
<div className={cn('flex flex-col md:flex-row gap-2 rounded-xl', { 'p-2': Boolean(onClose) }, className)}>
|
<div className={cn('flex flex-col md:flex-row gap-2 rounded-xl', { 'p-2': Boolean(onClose) }, className)}>
|
||||||
{card || <Card className='mx-auto' show={show} />}
|
{card || <Card className='mx-auto' show={show} />}
|
||||||
<div className='flex flex-col grow'>
|
<div className='flex grow flex-col'>
|
||||||
{children && <div className='flex hover-none:hidden w-full max-sm:mb-0 mb-2 gap-2'>{children}</div>}
|
{children && <div className='mb-2 flex w-full gap-2 hover-none:hidden max-sm:mb-0'>{children}</div>}
|
||||||
<div className='flex w-full gap-2'>
|
<div className='flex w-full gap-2'>
|
||||||
<Actions show={show} onClose={onClose} />
|
<Actions show={show} onClose={onClose} />
|
||||||
</div>
|
</div>
|
||||||
<Separator className='my-2' />
|
<Separator className='my-2' />
|
||||||
<p key={show.id} className='leading-7 mb-3'>
|
<p key={show.id} className='mb-3 leading-7'>
|
||||||
{show.overview}
|
{show.overview}
|
||||||
</p>
|
</p>
|
||||||
<div className='mt-auto grid grid-cols-1 rounded-lg'>
|
<div className='mt-auto grid grid-cols-1 rounded-lg'>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ const components: VirtuosoProps<Show, (index: number) => void>['components'] = {
|
|||||||
}),
|
}),
|
||||||
Scroller: forwardRef(function Scroller({ context, ...props }, ref) {
|
Scroller: forwardRef(function Scroller({ context, ...props }, ref) {
|
||||||
return (
|
return (
|
||||||
<div {...props} ref={ref} className='overflow-hidden no-scrollbar snap-mandatory snap-x rounded-lg h-full' />
|
<div {...props} ref={ref} className='no-scrollbar h-full snap-x snap-mandatory overflow-hidden rounded-lg' />
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ const Random = () => {
|
|||||||
return (
|
return (
|
||||||
<Preview
|
<Preview
|
||||||
show={movie}
|
show={movie}
|
||||||
className='bg-background rounded-md'
|
className='rounded-md bg-background'
|
||||||
card={<Carousel index={index} shows={movies} onIndexChange={onIndexChange} onEndReached={fetchNextPage} />}
|
card={<Carousel index={index} shows={movies} onIndexChange={onIndexChange} onEndReached={fetchNextPage} />}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -18,18 +18,18 @@ const Credits: FC<Props> = ({ showId, showType = 'movie', onPersonClick }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
Boolean(credits?.length) && (
|
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) => (
|
{credits?.map((actor) => (
|
||||||
<li
|
<li
|
||||||
key={`${actor.id}_${actor.cast_id}`}
|
key={`${actor.id}_${actor.cast_id}`}
|
||||||
title={actor.name}
|
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
|
<Link
|
||||||
href={`/starring?actorId=${actor.id}&title=${encodeURIComponent(actor.name)}`}
|
href={`/starring?actorId=${actor.id}&title=${encodeURIComponent(actor.name)}`}
|
||||||
onClick={() => onPersonClick?.(actor.id.toString())}
|
onClick={() => onPersonClick?.(actor.id.toString())}
|
||||||
>
|
>
|
||||||
<div className='rounded-lg overflow-hidden'>
|
<div className='overflow-hidden rounded-lg'>
|
||||||
{actor.profile_path ? (
|
{actor.profile_path ? (
|
||||||
<Image
|
<Image
|
||||||
unoptimized
|
unoptimized
|
||||||
@@ -39,15 +39,15 @@ const Credits: FC<Props> = ({ showId, showType = 'movie', onPersonClick }) => {
|
|||||||
alt={actor.name}
|
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} />
|
<User2 size={120} strokeWidth={1} />
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</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'>
|
<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=' overflow-ellipsis whitespace-nowrap overflow-hidden'>{actor.name}</p>
|
<p className=' truncate'>{actor.name}</p>
|
||||||
{Boolean(actor.character) && (
|
{Boolean(actor.character) && (
|
||||||
<p className='overflow-ellipsis whitespace-nowrap overflow-hidden'>{actor.character}</p>
|
<p className='truncate'>{actor.character}</p>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ interface Props {
|
|||||||
const Handlers: FC<Props> = ({ onClick, show }) => {
|
const Handlers: FC<Props> = ({ onClick, show }) => {
|
||||||
const { toggle } = useFavoriteToggle(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;
|
export default Handlers;
|
||||||
@@ -8,9 +8,9 @@ interface Props {
|
|||||||
|
|
||||||
const Poster: FC<Props> = ({ title, poster }) => {
|
const Poster: FC<Props> = ({ title, poster }) => {
|
||||||
return 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%)' />
|
<ImageOff size={100} strokeWidth={1} color='hsl(215.4 16.3% 46.9%)' />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const showHostManagerModal = create<InstanceProps<string>>(({ onResolve, onRejec
|
|||||||
const setPrefix = useSetPrefix();
|
const setPrefix = useSetPrefix();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal className='p-2 max-w-[200px] m-auto' onClose={onReject}>
|
<Modal className='m-auto max-w-[200px] p-2' onClose={onReject}>
|
||||||
<Input
|
<Input
|
||||||
autoFocus
|
autoFocus
|
||||||
placeholder='Enter address of your torrents streamer'
|
placeholder='Enter address of your torrents streamer'
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ const showPlayer = create(({ onResolve, magnet, backdrop }: Props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<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' }}
|
style={{ aspectRatio: '16/9' }}
|
||||||
onClose={onResolve}
|
onClose={onResolve}
|
||||||
>
|
>
|
||||||
@@ -62,7 +62,7 @@ const showPlayer = create(({ onResolve, magnet, backdrop }: Props) => {
|
|||||||
</Player>
|
</Player>
|
||||||
{isLoading && (
|
{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'>
|
<div className='animate-spin'>
|
||||||
<Loader color='white' />
|
<Loader color='white' />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -19,10 +19,10 @@ const TableHeadSortable: FC<Props> = ({ title, sort, value, sortable, onChange }
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<TableHead onClick={handleSort} className={cn('select-none px-2', sortable && 'cursor-pointer')}>
|
<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>
|
<span>{title}</span>
|
||||||
{sortable &&
|
{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>
|
</div>
|
||||||
</TableHead>
|
</TableHead>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -49,12 +49,12 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal className='p-0' onClose={onResolve}>
|
<Modal className='p-0' onClose={onResolve}>
|
||||||
<Table className='rounded-xl overflow-hidden'>
|
<Table className='overflow-hidden rounded-xl'>
|
||||||
<TableHeader>
|
<TableHeader>
|
||||||
<TableRow className='!border-b-0'>
|
<TableRow className='!border-b-0'>
|
||||||
<TableHead className='px-2' colSpan={4}>
|
<TableHead className='px-2' colSpan={4}>
|
||||||
<div className='grid grid-cols-[1fr_auto] items-center gap-3'>
|
<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
|
<Button
|
||||||
className='h-6 p-2'
|
className='h-6 p-2'
|
||||||
variant={withYear ? 'default' : 'ghost'}
|
variant={withYear ? 'default' : 'ghost'}
|
||||||
@@ -82,7 +82,7 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
|
|||||||
{!isMobile && <TableHead className='px-2'>Title</TableHead>}
|
{!isMobile && <TableHead className='px-2'>Title</TableHead>}
|
||||||
<TableHeadSortable sortable={sortable} title='Size' sort={Sort.size} value={sort} onChange={setSort} />
|
<TableHeadSortable sortable={sortable} title='Size' sort={Sort.size} value={sort} onChange={setSort} />
|
||||||
<TableHeadSortable sortable={sortable} title='Seeders' sort={Sort.seeds} 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>
|
</TableRow>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<TableBody>
|
<TableBody>
|
||||||
@@ -102,24 +102,24 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
|
|||||||
</TableCell>
|
</TableCell>
|
||||||
)}
|
)}
|
||||||
<TableCell className='p-2'>
|
<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>
|
||||||
<TableCell className='p-2'>{torrent.seeders}</TableCell>
|
<TableCell className='p-2'>{torrent.seeders}</TableCell>
|
||||||
<TableCell className='text-center p-1 pr-2'>
|
<TableCell className='p-1 pr-2 text-center'>
|
||||||
<div className='flex gap-2 justify-end'>
|
<div className='flex justify-end gap-2'>
|
||||||
{Boolean(key === providers.yts.key && torrent.seeders) && (
|
{Boolean(key === providers.yts.key && torrent.seeders) && (
|
||||||
<div
|
<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 })}
|
onClick={() => showPlayer({ magnet: torrent.magnet, backdrop })}
|
||||||
>
|
>
|
||||||
<Play size={20} />
|
<Play size={20} />
|
||||||
</div>
|
</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} />
|
<Magnet size={20} />
|
||||||
</a>
|
</a>
|
||||||
<div
|
<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)}
|
onClick={() => navigator.clipboard.writeText(torrent.magnet)}
|
||||||
>
|
>
|
||||||
<Copy size={20} />
|
<Copy size={20} />
|
||||||
@@ -127,7 +127,7 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
|
|||||||
{prefix && !prefix.includes('{host}') && (
|
{prefix && !prefix.includes('{host}') && (
|
||||||
<div
|
<div
|
||||||
onClick={() => cast(torrent.magnet!)}
|
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} />
|
<Cast size={20} />
|
||||||
</div>
|
</div>
|
||||||
@@ -140,7 +140,7 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
|
|||||||
{isLoading && (
|
{isLoading && (
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell colSpan={4}>
|
<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' />
|
<Loader className='animate-spin' />
|
||||||
</div>
|
</div>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
@@ -149,7 +149,7 @@ const showTorrentsModal = create(({ title, year, showType, showId, backdrop, onR
|
|||||||
{!isLoading && isFetched && !torrents?.length && (
|
{!isLoading && isFetched && !torrents?.length && (
|
||||||
<TableRow>
|
<TableRow>
|
||||||
<TableCell colSpan={4}>
|
<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
|
Nothing was found
|
||||||
</div>
|
</div>
|
||||||
</TableCell>
|
</TableCell>
|
||||||
|
|||||||
@@ -17,11 +17,11 @@ const showTrailerModal = create(({ trailerKey, onResolve }: { trailerKey?: strin
|
|||||||
if (!trailerKey) return;
|
if (!trailerKey) return;
|
||||||
|
|
||||||
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
|
<iframe
|
||||||
allowFullScreen
|
allowFullScreen
|
||||||
allow='autoplay'
|
allow='autoplay'
|
||||||
className='border-none rounded-lg'
|
className='rounded-lg border-none'
|
||||||
width='100%'
|
width='100%'
|
||||||
height='100%'
|
height='100%'
|
||||||
src={`//www.youtube.com/embed/${trailerKey}?autoplay=1`}
|
src={`//www.youtube.com/embed/${trailerKey}?autoplay=1`}
|
||||||
|
|||||||
@@ -25,17 +25,17 @@ const Show: FC<Props> = ({ show, onClick, className, containerProps }) => {
|
|||||||
className
|
className
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className='flex w-full h-full'>
|
<div className='flex size-full'>
|
||||||
<Poster title={show.title} poster={show.poster} />
|
<Poster title={show.title} poster={show.poster} />
|
||||||
</div>
|
</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} />
|
<Handlers show={show} onClick={onClick} />
|
||||||
<div className='grid grid-cols-[1fr_auto] opacity-75 gap-2'>
|
<div className='grid grid-cols-[1fr_auto] gap-2 opacity-75'>
|
||||||
<span className='overflow-ellipsis overflow-hidden whitespace-nowrap'>{show.title}</span>
|
<span className='truncate'>{show.title}</span>
|
||||||
{Boolean(show.release) && <span>{new Date(show.release).getFullYear()}</span>}
|
{Boolean(show.release) && <span>{new Date(show.release).getFullYear()}</span>}
|
||||||
</div>
|
</div>
|
||||||
<div className='opacity-75 mb-[-5px]'>
|
<div className='mb-[-5px] opacity-75'>
|
||||||
<span className='select-none flex w-full items-center ml-auto gap-1 mt-[-8px] justify-between z-[1]'>
|
<span className='z-[1] ml-auto mt-[-8px] flex w-full select-none items-center justify-between gap-1'>
|
||||||
<Favorite show={show} />
|
<Favorite show={show} />
|
||||||
<Rating rating={show.rating} />
|
<Rating rating={show.rating} />
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ interface Props {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const Marquee: FC<Props> = ({ shows }) => (
|
const Marquee: FC<Props> = ({ shows }) => (
|
||||||
<ul className='flex overflow-auto gap-2 rounded-lg snap-mandatory snap-x no-scrollbar 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'>
|
||||||
{shows.map((show) => (
|
{shows.map((show) => (
|
||||||
<li key={show.id} className='snap-start'>
|
<li key={show.id} className='snap-start'>
|
||||||
<Card className='!h-[350px] !w-[230px] text-sm' show={show} onClick={() => showPreviewModal({ show })} />
|
<Card className='!h-[350px] !w-[230px] text-sm' show={show} onClick={() => showPreviewModal({ show })} />
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const buttonVariants = cva(
|
|||||||
{
|
{
|
||||||
variants: {
|
variants: {
|
||||||
variant: {
|
variant: {
|
||||||
default: 'bg-primary text-primary-foreground hover:bg-primary/90 shadow-sm active:shadow',
|
default: 'bg-primary text-primary-foreground shadow-sm hover:bg-primary/90 active:shadow',
|
||||||
destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
|
destructive: 'bg-destructive text-destructive-foreground hover:bg-destructive/90',
|
||||||
outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
|
outline: 'border border-input bg-background hover:bg-accent hover:text-accent-foreground',
|
||||||
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',
|
||||||
@@ -19,7 +19,7 @@ const buttonVariants = cva(
|
|||||||
default: 'h-10 px-4 py-2',
|
default: 'h-10 px-4 py-2',
|
||||||
sm: 'h-9 rounded-md px-3',
|
sm: 'h-9 rounded-md px-3',
|
||||||
lg: 'h-11 rounded-md px-8',
|
lg: 'h-11 rounded-md px-8',
|
||||||
icon: 'h-10 w-10'
|
icon: 'size-10'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ const DialogContent = React.forwardRef<
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<DialogPortal>
|
<DialogPortal>
|
||||||
<div className='fixed inset-0 w-full h-full bg-black/50 z-50' ref={wrapperRef}>
|
<div className='fixed inset-0 z-50 size-full bg-black/50' ref={wrapperRef}>
|
||||||
<DialogOverlay
|
<DialogOverlay
|
||||||
ref={(element) => {
|
ref={(element) => {
|
||||||
if (!element) return;
|
if (!element) return;
|
||||||
@@ -115,7 +115,7 @@ const DialogContent = React.forwardRef<
|
|||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
<div className='absolute top-full block w-10 h-[20vh] pointer-events-none' />
|
<div className='pointer-events-none absolute top-full block h-[20vh] w-10' />
|
||||||
</DialogPrimitive.Content>
|
</DialogPrimitive.Content>
|
||||||
</DialogOverlay>
|
</DialogOverlay>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
|
|||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
<ChevronRight className='ml-auto h-4 w-4' />
|
<ChevronRight className='ml-auto size-4' />
|
||||||
</DropdownMenuPrimitive.SubTrigger>
|
</DropdownMenuPrimitive.SubTrigger>
|
||||||
));
|
));
|
||||||
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
||||||
@@ -103,9 +103,9 @@ const DropdownMenuCheckboxItem = React.forwardRef<
|
|||||||
checked={checked}
|
checked={checked}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
<span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
|
<span className='absolute left-2 flex size-3.5 items-center justify-center'>
|
||||||
<DropdownMenuPrimitive.ItemIndicator>
|
<DropdownMenuPrimitive.ItemIndicator>
|
||||||
<Check className='h-4 w-4' />
|
<Check className='size-4' />
|
||||||
</DropdownMenuPrimitive.ItemIndicator>
|
</DropdownMenuPrimitive.ItemIndicator>
|
||||||
</span>
|
</span>
|
||||||
{children}
|
{children}
|
||||||
@@ -125,9 +125,9 @@ const DropdownMenuRadioItem = React.forwardRef<
|
|||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
<span className='absolute left-2 flex h-3.5 w-3.5 items-center justify-center'>
|
<span className='absolute left-2 flex size-3.5 items-center justify-center'>
|
||||||
<DropdownMenuPrimitive.ItemIndicator>
|
<DropdownMenuPrimitive.ItemIndicator>
|
||||||
<Circle className='h-2 w-2 fill-current' />
|
<Circle className='size-2 fill-current' />
|
||||||
</DropdownMenuPrimitive.ItemIndicator>
|
</DropdownMenuPrimitive.ItemIndicator>
|
||||||
</span>
|
</span>
|
||||||
{children}
|
{children}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ type CursorProps = { left: number; width: number; opacity: number };
|
|||||||
|
|
||||||
const Cursor: FC<CursorProps> = ({ width, left, opacity }) => (
|
const Cursor: FC<CursorProps> = ({ width, left, opacity }) => (
|
||||||
<li
|
<li
|
||||||
className='pointer-events-none absolute bg-primary rounded-2xl h-full z-0 transition-all'
|
className='pointer-events-none absolute z-0 h-full rounded-2xl bg-primary transition-all'
|
||||||
style={{ width, left, opacity }}
|
style={{ width, left, opacity }}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -83,7 +83,7 @@ const ToastClose = React.forwardRef<
|
|||||||
toast-close=""
|
toast-close=""
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
<X className="h-4 w-4" />
|
<X className="size-4" />
|
||||||
</ToastPrimitives.Close>
|
</ToastPrimitives.Close>
|
||||||
))
|
))
|
||||||
ToastClose.displayName = ToastPrimitives.Close.displayName
|
ToastClose.displayName = ToastPrimitives.Close.displayName
|
||||||
|
|||||||
+2
-3
@@ -1,9 +1,7 @@
|
|||||||
import { type ClassValue, clsx } from 'clsx';
|
import { type ClassValue, clsx } from 'clsx';
|
||||||
import { twMerge } from 'tailwind-merge';
|
import { twMerge } from 'tailwind-merge';
|
||||||
|
|
||||||
export function cn(...inputs: ClassValue[]) {
|
export const cn = (...inputs: ClassValue[]) => twMerge(clsx(inputs));
|
||||||
return twMerge(clsx(inputs));
|
|
||||||
}
|
|
||||||
|
|
||||||
export const createUniqueRandomGenerator = (max: number) => {
|
export const createUniqueRandomGenerator = (max: number) => {
|
||||||
const numbers = Array.from({ length: max }, (_, i) => i + 1);
|
const numbers = Array.from({ length: max }, (_, i) => i + 1);
|
||||||
@@ -19,6 +17,7 @@ export const createUniqueRandomGenerator = (max: number) => {
|
|||||||
if (index >= numbers.length) {
|
if (index >= numbers.length) {
|
||||||
index = 0;
|
index = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
return numbers[index++];
|
return numbers[index++];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
Generated
+44
-1135
File diff suppressed because it is too large.
Load diff
+3
-3
@@ -6,7 +6,7 @@
|
|||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
"start": "next start",
|
"start": "next start",
|
||||||
"lint": "next lint"
|
"lint": "next lint --fix ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@radix-ui/react-dialog": "^1.1.1",
|
"@radix-ui/react-dialog": "^1.1.1",
|
||||||
@@ -38,8 +38,7 @@
|
|||||||
"tailwindcss-animate": "^1.0.6",
|
"tailwindcss-animate": "^1.0.6",
|
||||||
"typescript": "5.1.6",
|
"typescript": "5.1.6",
|
||||||
"vaul": "^0.8.9",
|
"vaul": "^0.8.9",
|
||||||
"video-react": "^0.16.0",
|
"video-react": "^0.16.0"
|
||||||
"video.js": "^8.17.4"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/js-cookie": "^3.0.3",
|
"@types/js-cookie": "^3.0.3",
|
||||||
@@ -49,6 +48,7 @@
|
|||||||
"@types/video-react": "^0.15.8",
|
"@types/video-react": "^0.15.8",
|
||||||
"autoprefixer": "^10.4.14",
|
"autoprefixer": "^10.4.14",
|
||||||
"eslint-plugin-simple-import-sort": "^10.0.0",
|
"eslint-plugin-simple-import-sort": "^10.0.0",
|
||||||
|
"eslint-plugin-tailwindcss": "^3.17.4",
|
||||||
"postcss": "^8.4.27",
|
"postcss": "^8.4.27",
|
||||||
"prettier": "^3.0.0",
|
"prettier": "^3.0.0",
|
||||||
"tailwindcss": "^3.3.3",
|
"tailwindcss": "^3.3.3",
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 394 80"><path fill="#000" d="M262 0h68.5v12.7h-27.2v66.6h-13.6V12.7H262V0ZM149 0v12.7H94v20.4h44.3v12.6H94v21h55v12.6H80.5V0h68.7zm34.3 0h-17.8l63.8 79.4h17.9l-32-39.7 32-39.6h-17.9l-23 28.6-23-28.6zm18.3 56.7-9-11-27.1 33.7h17.8l18.3-22.7z"/><path fill="#000" d="M81 79.3 17 0H0v79.3h13.6V17l50.2 62.3H81Zm252.6-.4c-1 0-1.8-.4-2.5-1s-1.1-1.6-1.1-2.6.3-1.8 1-2.5 1.6-1 2.6-1 1.8.3 2.5 1a3.4 3.4 0 0 1 .6 4.3 3.7 3.7 0 0 1-3 1.8zm23.2-33.5h6v23.3c0 2.1-.4 4-1.3 5.5a9.1 9.1 0 0 1-3.8 3.5c-1.6.8-3.5 1.3-5.7 1.3-2 0-3.7-.4-5.3-1s-2.8-1.8-3.7-3.2c-.9-1.3-1.4-3-1.4-5h6c.1.8.3 1.6.7 2.2s1 1.2 1.6 1.5c.7.4 1.5.5 2.4.5 1 0 1.8-.2 2.4-.6a4 4 0 0 0 1.6-1.8c.3-.8.5-1.8.5-3V45.5zm30.9 9.1a4.4 4.4 0 0 0-2-3.3 7.5 7.5 0 0 0-4.3-1.1c-1.3 0-2.4.2-3.3.5-.9.4-1.6 1-2 1.6a3.5 3.5 0 0 0-.3 4c.3.5.7.9 1.3 1.2l1.8 1 2 .5 3.2.8c1.3.3 2.5.7 3.7 1.2a13 13 0 0 1 3.2 1.8 8.1 8.1 0 0 1 3 6.5c0 2-.5 3.7-1.5 5.1a10 10 0 0 1-4.4 3.5c-1.8.8-4.1 1.2-6.8 1.2-2.6 0-4.9-.4-6.8-1.2-2-.8-3.4-2-4.5-3.5a10 10 0 0 1-1.7-5.6h6a5 5 0 0 0 3.5 4.6c1 .4 2.2.6 3.4.6 1.3 0 2.5-.2 3.5-.6 1-.4 1.8-1 2.4-1.7a4 4 0 0 0 .8-2.4c0-.9-.2-1.6-.7-2.2a11 11 0 0 0-2.1-1.4l-3.2-1-3.8-1c-2.8-.7-5-1.7-6.6-3.2a7.2 7.2 0 0 1-2.4-5.7 8 8 0 0 1 1.7-5 10 10 0 0 1 4.3-3.5c2-.8 4-1.2 6.4-1.2 2.3 0 4.4.4 6.2 1.2 1.8.8 3.2 2 4.3 3.4 1 1.4 1.5 3 1.5 5h-5.8z"/></svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.3 KiB |
Reference in new issue
Block a user