fix: filesize lib was buggy. removed selection options as we dont use thos
This commit is contained in:
parent
ffef784f50
commit
4cadd0072d
|
@ -37,5 +37,5 @@ export default function filesize(bytes: number, fixed = 1, spec: keyof typeof SP
|
||||||
_bytes /= radix;
|
_bytes /= radix;
|
||||||
++loop;
|
++loop;
|
||||||
}
|
}
|
||||||
return `${bytes.toFixed(fixed)} ${unit[loop]}`;
|
return `${_bytes.toFixed(fixed)} ${unit[loop]}`;
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,29 +27,29 @@ export type File = {
|
||||||
};
|
};
|
||||||
|
|
||||||
export const columns: ColumnDef<FileItem>[] = [
|
export const columns: ColumnDef<FileItem>[] = [
|
||||||
{
|
// {
|
||||||
id: "select",
|
// id: "select",
|
||||||
size: 20,
|
// size: 20,
|
||||||
header: ({ table }) => (
|
// header: ({ table }) => (
|
||||||
<Checkbox
|
// <Checkbox
|
||||||
checked={
|
// checked={
|
||||||
table.getIsAllPageRowsSelected() ||
|
// table.getIsAllPageRowsSelected() ||
|
||||||
(table.getIsSomePageRowsSelected() && "indeterminate")
|
// (table.getIsSomePageRowsSelected() && "indeterminate")
|
||||||
}
|
// }
|
||||||
onCheckedChange={(value) => table.toggleAllPageRowsSelected(!!value)}
|
// onCheckedChange={(value) => table.toggleAllPageRowsSelected(!!value)}
|
||||||
aria-label="Select all"
|
// aria-label="Select all"
|
||||||
/>
|
// />
|
||||||
),
|
// ),
|
||||||
cell: ({ row }) => (
|
// cell: ({ row }) => (
|
||||||
<Checkbox
|
// <Checkbox
|
||||||
checked={row.getIsSelected()}
|
// checked={row.getIsSelected()}
|
||||||
onCheckedChange={(value) => row.toggleSelected(!!value)}
|
// onCheckedChange={(value) => row.toggleSelected(!!value)}
|
||||||
aria-label="Select row"
|
// aria-label="Select row"
|
||||||
/>
|
// />
|
||||||
),
|
// ),
|
||||||
enableSorting: false,
|
// enableSorting: false,
|
||||||
enableHiding: false,
|
// enableHiding: false,
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
accessorKey: "cid",
|
accessorKey: "cid",
|
||||||
header: "CID",
|
header: "CID",
|
||||||
|
|
|
@ -64,10 +64,11 @@ export default function FileManager() {
|
||||||
placeholder="Search files by name or CID"
|
placeholder="Search files by name or CID"
|
||||||
className="border-ring font-medium w-full grow h-12 flex-1 bg-primary-2/10"
|
className="border-ring font-medium w-full grow h-12 flex-1 bg-primary-2/10"
|
||||||
/>
|
/>
|
||||||
<Button className="h-12 gap-x-2">
|
{/* We dont yet have any functionality for selecting so im commenting this out */}
|
||||||
|
{/* <Button className="h-12 gap-x-2">
|
||||||
<AddIcon />
|
<AddIcon />
|
||||||
Select All
|
Select All
|
||||||
</Button>
|
</Button> */}
|
||||||
<DialogTrigger asChild>
|
<DialogTrigger asChild>
|
||||||
<Button className="h-12 gap-x-2">
|
<Button className="h-12 gap-x-2">
|
||||||
<AddIcon />
|
<AddIcon />
|
||||||
|
|
Loading…
Reference in New Issue