fix: header
This commit is contained in:
1 parent
095f7361fa
commit
1a762d00c5
13 files changed
+432
-105
No files matched your search
@@ -34,7 +34,7 @@ const Preview: FC<Props> = ({ movie, className, direction, onClose }) => {
|
||||
|
||||
return (
|
||||
<div className={cn('rounded-xl text-card-foreground', { 'p-2': Boolean(onClose) }, className)}>
|
||||
<div className='flex flex-col lg:flex-row max-w-[100%] gap-3'>
|
||||
<div className='flex flex-col lg:flex-row max-w-[100%] gap-2'>
|
||||
<div className='max-w-[300px] min-w-[300px] h-[450px] mx-auto w-[100%] relative overflow-hidden rounded-lg'>
|
||||
<AnimatePresence custom={direction}>
|
||||
<motion.div
|
||||
|
||||
@@ -36,7 +36,7 @@ const Credits: FC<Props> = ({ movieId, onPersonClick }) => {
|
||||
|
||||
return (
|
||||
Boolean(credits?.length) && (
|
||||
<div className='overflow-auto max-w-[100%] py-3 mb-[-0.75rem]'>
|
||||
<div className='overflow-auto no-scrollbar max-w-[100%] py-2 pb-5 mb-[-0.75rem]'>
|
||||
<motion.ul className='flex gap-3' variants={container} initial='hidden' animate='visible' whileInView='visible'>
|
||||
{credits?.map((actor) => (
|
||||
<motion.li
|
||||
|
||||
@@ -67,7 +67,7 @@ const showHostManagerModal = create(({ onResolve, isOpen }) => {
|
||||
});
|
||||
|
||||
const Torrents: FC<Props> = ({ title, year, isOpen, onResolve }) => {
|
||||
const host = useAtomValue(hostAtom);
|
||||
const hosts = useAtomValue(hostAtom);
|
||||
const [sorting, setSorting] = useState<Sorting>({ by: ORDER.seeders });
|
||||
const [withYear, setWithYear] = useState(true);
|
||||
|
||||
@@ -80,8 +80,10 @@ const Torrents: FC<Props> = ({ title, year, isOpen, onResolve }) => {
|
||||
const handleCast = (magnet: string) => (event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => {
|
||||
event.preventDefault();
|
||||
|
||||
const link = window.open(`http://${host}:65220/playuri?uri=${magnet}`, '_blank');
|
||||
setTimeout(() => link?.close(), 100);
|
||||
hosts.split(',').forEach((host) => {
|
||||
const link = window.open(`http://${host}:65220/playuri?uri=${magnet}`, '_blank');
|
||||
setTimeout(() => link?.close(), 100);
|
||||
});
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -89,8 +91,8 @@ const Torrents: FC<Props> = ({ title, year, isOpen, onResolve }) => {
|
||||
<Table className='rounded-xl overflow-hidden'>
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
<TableHead className='px-2'>
|
||||
Title: {title}{' '}
|
||||
<TableHead className='px-2' colSpan={4}>
|
||||
{title}{' '}
|
||||
<Toggle
|
||||
size='sm'
|
||||
className='p-2 h-7'
|
||||
@@ -100,6 +102,9 @@ const Torrents: FC<Props> = ({ title, year, isOpen, onResolve }) => {
|
||||
{year}
|
||||
</Toggle>
|
||||
</TableHead>
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
<TableHead className='px-2'>Title</TableHead>
|
||||
<TableHeadSortable title='Size' by={ORDER.size} value={sorting} onChange={setSorting} />
|
||||
<TableHeadSortable title='Seeders' by={ORDER.seeders} value={sorting} onChange={setSorting} />
|
||||
<TableHead className='px-2 text-center cursor-pointer select-none' onClick={() => showHostManagerModal()}>
|
||||
@@ -117,7 +122,7 @@ const Torrents: FC<Props> = ({ title, year, isOpen, onResolve }) => {
|
||||
<TableCell className='text-center p-2'>{torrent.seeders}</TableCell>
|
||||
<TableCell className='text-center p-1'>
|
||||
<div className='flex gap-2 m-auto justify-center'>
|
||||
{host ? (
|
||||
{hosts ? (
|
||||
<a
|
||||
onClick={handleCast(torrent.magnet!)}
|
||||
className='flex items-center justify-center h-8 w-8 border rounded-lg'
|
||||
|
||||
Reference in new issue
Block a user