fix: font-size

This commit is contained in:
ner committed 2024-10-27 16:27:38 +02:00
1 parent 299037c65c
commit 2cf6291470
6 files changed
+69 -18

No files matched your search

+3 -1
View File
@@ -23,7 +23,9 @@ const Header: FC<Props> = ({ className }) => (
<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='cursor-pointer whitespace-nowrap font-normal'>Movie advisor</Badge> <Badge className='cursor-pointer whitespace-nowrap text-[15px] font-normal leading-[18px]'>
Movie advisor
</Badge>
</Link> </Link>
<DesktopNavigation /> <DesktopNavigation />
<div className='flex items-center gap-2'> <div className='flex items-center gap-2'>
@@ -50,7 +50,7 @@ const Actions = ({ onClose, show, className }: Props) => {
<Bookmark size={14} className={cn({ 'fill-secondary-foreground': state?.watchlist })} /> <Bookmark size={14} className={cn({ 'fill-secondary-foreground': state?.watchlist })} />
</Button> </Button>
</ButtonsGroup> </ButtonsGroup>
<ButtonsGroup className='gap-0'> <ButtonsGroup>
<Button <Button
onClick={() => { onClick={() => {
onClose?.(); onClose?.();
@@ -64,7 +64,10 @@ const Actions = ({ onClose, show, className }: Props) => {
</Button> </Button>
<Button <Button
aria-label='Watch' aria-label='Watch'
className={cn({ 'bg-red-600': theme === 'light', 'bg-red-700': theme === 'dark' })} className={cn('hover:shadow-lg hover:shadow-red-600/60 duration-200 transition-all hover:bg-red-600', {
'bg-red-600': theme === 'light',
'bg-red-700': theme === 'dark'
})}
variant='destructive' variant='destructive'
onClick={() => onClick={() =>
showTorrentsModal({ showTorrentsModal({
@@ -1,5 +1,5 @@
import { FC } from 'react'; import { FC } from 'react';
import { Cast, ChevronLeft,ListVideo, Magnet, Play } from 'lucide-react'; import { Cast, Download, ListVideo, Loader, Magnet, Play } from 'lucide-react';
import { Quality } from '@/api/parsers/yts/models'; import { Quality } from '@/api/parsers/yts/models';
import { Button } from '@/components/ui/button'; import { Button } from '@/components/ui/button';
@@ -36,28 +36,23 @@ const Actions: FC<Props> = ({ torrent, backdrop, title, provider }) => {
const supportedForCast = prefix && !prefix.includes('{host}'); const supportedForCast = prefix && !prefix.includes('{host}');
if (!magnet)
return ( return (
<ButtonsGroup className='ml-auto justify-end bg-transparent'> <div className='relative ml-auto w-fit grow-0'>
<Button className='grow-0 px-2' disabled={fetchMagnet.isPending} onClick={() => fetchMagnet.mutate()}> <ButtonsGroup>
<ChevronLeft size={15} />
</Button>
</ButtonsGroup>
);
return (
<ButtonsGroup className='ml-auto w-fit grow-0'>
{supportedForStream && ( {supportedForStream && (
<Button <Button
variant='destructive' variant='destructive'
className={cn('flex-grow-0 px-3 bg-red-600')} className={cn(
'flex-grow-0 px-3 bg-red-600',
'hover:shadow-lg hover:shadow-red-600/60 duration-200 transition-all hover:bg-red-600'
)}
onClick={() => showPlayer({ magnet, backdrop, title })} onClick={() => showPlayer({ magnet, backdrop, title })}
title='Play' title='Play'
> >
<Play size={15} /> <Play size={15} />
</Button> </Button>
)} )}
<Button variant='outline' className='relative grow-0 px-3' title='Play using your native video player'> <Button variant='outline' className='relative grow-0 px-3' title='Download m3u playlist'>
<a <a
className='absolute left-0 top-0 size-full' className='absolute left-0 top-0 size-full'
href={`${process.env.NEXT_PUBLIC_TORRENT_PROXY}/stream?m3u&link=${encodeURIComponent(magnet)}`} href={`${process.env.NEXT_PUBLIC_TORRENT_PROXY}/stream?m3u&link=${encodeURIComponent(magnet)}`}
@@ -74,6 +69,24 @@ const Actions: FC<Props> = ({ torrent, backdrop, title, provider }) => {
</Button> </Button>
)} )}
</ButtonsGroup> </ButtonsGroup>
{!magnet && (
<Button
title='Fetch files'
variant='outline'
disabled={fetchMagnet.isPending}
onClick={() => fetchMagnet.mutate()}
className={cn('z-10 h-8 absolute size-full left-0 top-0 rounded-md disabled:opacity-100')}
>
{fetchMagnet.isPending ? (
<div className='animate-spin'>
<Loader size={18} />
</div>
) : (
<Download size={18} />
)}
</Button>
)}
</div>
); );
}; };
@@ -48,7 +48,7 @@ const TorrentsTable: FC<Props> = ({ title, torrents, backdrop, sort, sortable, p
const yearView = torrent.year && year.toString() != torrent.year && `[${torrent.year}]`; const yearView = torrent.year && year.toString() != torrent.year && `[${torrent.year}]`;
return ( return (
<Fragment key={torrent.magnet + torrent.id}> <Fragment key={torrent.magnet + torrent.id + torrent.download}>
<TableRow className='table-row border-b-0 hover:bg-transparent md:hidden'> <TableRow className='table-row border-b-0 hover:bg-transparent md:hidden'>
<TableCell className='break-all p-2' colSpan={colSpan}> <TableCell className='break-all p-2' colSpan={colSpan}>
<span className='flex w-full flex-wrap items-center gap-3'> <span className='flex w-full flex-wrap items-center gap-3'>
+1 -1
View File
@@ -46,7 +46,7 @@ function Nav<T extends Tab>({ tabs, active, className, children, onChange }: Nav
key={title} key={title}
ref={isActive ? currentRef : undefined} ref={isActive ? currentRef : undefined}
onClick={() => onChange?.(tab)} onClick={() => onChange?.(tab)}
className={cn('z-10 px-2.5 py-0.5 font-normal cursor-pointer', { className={cn('z-10 px-2.5 py-0.5 font-normal text-[15px] leading-[20px] cursor-pointer', {
'cursor-default text-secondary': isActive, 'cursor-default text-secondary': isActive,
'mix-blend-difference text-white': !transitionEnded 'mix-blend-difference text-white': !transitionEnded
})} })}
+33
View File
@@ -16,6 +16,7 @@
"@tanstack/react-query": "^5.59.15", "@tanstack/react-query": "^5.59.15",
"@types/cheerio": "^0.22.35", "@types/cheerio": "^0.22.35",
"@vidstack/react": "^1.12.11", "@vidstack/react": "^1.12.11",
"addic7ed-api": "^2.0.1",
"axios": "^1.7.7", "axios": "^1.7.7",
"axios-cookiejar-support": "^5.0.3", "axios-cookiejar-support": "^5.0.3",
"cheerio": "^1.0.0", "cheerio": "^1.0.0",
@@ -4741,6 +4742,17 @@
"acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
} }
}, },
"node_modules/addic7ed-api": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/addic7ed-api/-/addic7ed-api-2.0.1.tgz",
"integrity": "sha512-TWwEvC3Tm8nrOjr+sOWuJ+yfNpCulVtsCn8N5ea9U+PlJC7LdpE4pPE6bRlJO0aRJ6mXwQFb1rrPt+GKDtTnSw==",
"license": "MIT",
"dependencies": {
"iconv-lite": "^0.6.3",
"langs": "^2.0.0",
"node-fetch": "^3.3.0"
}
},
"node_modules/agent-base": { "node_modules/agent-base": {
"version": "7.1.1", "version": "7.1.1",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz",
@@ -8242,6 +8254,12 @@
"node": ">=4.0" "node": ">=4.0"
} }
}, },
"node_modules/langs": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/langs/-/langs-2.0.0.tgz",
"integrity": "sha512-v4pxOBEQVN1WBTfB1crhTtxzNLZU9HPWgadlwzWKISJtt6Ku/CnpBrwVy+jFv8StjxsPfwPFzO0CMwdZLJ0/BA==",
"license": "MIT"
},
"node_modules/language-subtag-registry": { "node_modules/language-subtag-registry": {
"version": "0.3.22", "version": "0.3.22",
"resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz",
@@ -14509,6 +14527,16 @@
"dev": true, "dev": true,
"requires": {} "requires": {}
}, },
"addic7ed-api": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/addic7ed-api/-/addic7ed-api-2.0.1.tgz",
"integrity": "sha512-TWwEvC3Tm8nrOjr+sOWuJ+yfNpCulVtsCn8N5ea9U+PlJC7LdpE4pPE6bRlJO0aRJ6mXwQFb1rrPt+GKDtTnSw==",
"requires": {
"iconv-lite": "^0.6.3",
"langs": "^2.0.0",
"node-fetch": "^3.3.0"
}
},
"agent-base": { "agent-base": {
"version": "7.1.1", "version": "7.1.1",
"resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz", "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.1.tgz",
@@ -16916,6 +16944,11 @@
"object.values": "^1.1.6" "object.values": "^1.1.6"
} }
}, },
"langs": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/langs/-/langs-2.0.0.tgz",
"integrity": "sha512-v4pxOBEQVN1WBTfB1crhTtxzNLZU9HPWgadlwzWKISJtt6Ku/CnpBrwVy+jFv8StjxsPfwPFzO0CMwdZLJ0/BA=="
},
"language-subtag-registry": { "language-subtag-registry": {
"version": "0.3.22", "version": "0.3.22",
"resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz", "resolved": "https://registry.npmjs.org/language-subtag-registry/-/language-subtag-registry-0.3.22.tgz",