feat: filter can be hidden
This commit is contained in:
1 parent
c42d5a5298
commit
ff506e755c
13 files changed
+73
-83
No files matched your search
@@ -16,16 +16,6 @@ type Sorting = {
|
||||
by: ORDER;
|
||||
};
|
||||
|
||||
function convertToBytes(size: string) {
|
||||
const units: Record<string, number> = { B: 1, KiB: 1024, MiB: 1024 * 1024, GiB: 1024 * 1024 * 1024 };
|
||||
const [value, unit] = size.split(' ');
|
||||
return parseFloat(value) * units[unit];
|
||||
}
|
||||
|
||||
function compareSizes(size1: string, size2: string) {
|
||||
return convertToBytes(size1) - convertToBytes(size2);
|
||||
}
|
||||
|
||||
const TableHeadSortable = ({
|
||||
title,
|
||||
by,
|
||||
@@ -60,8 +50,8 @@ const Torrents: FC<Props> = ({ title, onClose }) => {
|
||||
|
||||
return (
|
||||
<Dialog defaultOpen={true} onOpenChange={(isOpen) => !isOpen && onClose()}>
|
||||
<DialogContent className='p-0'>
|
||||
<Table>
|
||||
<DialogContent className='p-0' onClose={onClose}>
|
||||
<Table className='rounded-xl overflow-hidden'>
|
||||
<TableHeader>
|
||||
<TableRow>
|
||||
<TableHead className='px-2'>Title</TableHead>
|
||||
|
||||
@@ -11,7 +11,7 @@ const Trailer: FC<Props> = ({ trailerKey, onClose }) => {
|
||||
return (
|
||||
trailerKey && (
|
||||
<Dialog defaultOpen={true} onOpenChange={(isOpen) => !isOpen && onClose()}>
|
||||
<DialogContent className='block p-0 min-h-[400px] aspect-w-16 aspect-h-9'>
|
||||
<DialogContent className='block p-0 min-h-[400px] border-none aspect-w-16 aspect-h-9' onClose={onClose}>
|
||||
<iframe
|
||||
allow='autoplay'
|
||||
className='border-none rounded-lg'
|
||||
|
||||
Reference in new issue
Block a user