Compare commits

..

No commits in common. "9d9aa4e9c9a4e4a1683a897b9b9966065ed4fa4a" and "364f2b048b6edf7f4fee5d4a32c1384e62d23cf8" have entirely different histories.

3 changed files with 61 additions and 86 deletions

View File

@ -1,89 +1,64 @@
import { GeneralLayout } from "~/components/general-layout"; import {GeneralLayout} from "~/components/general-layout";
import { FileCard, FileCardList, FileTypes } from "~/components/file-card"; import {FileCard, FileCardList, FileTypes} from "~/components/file-card";
import { DataTable } from "~/components/data-table"; import {DataTable} from "~/components/data-table";
import { columns } from "./columns"; import {columns} from "./columns";
import { Input } from "~/components/ui/input"; import {Input} from "~/components/ui/input";
import { Button } from "~/components/ui/button"; import {Button} from "~/components/ui/button";
import { AddIcon } from "~/components/icons"; import {AddIcon} from "~/components/icons";
import { Authenticated } from "@refinedev/core"; import {Authenticated} from "@refinedev/core";
import {
Dialog,
DialogContent,
DialogHeader,
DialogTitle,
DialogTrigger,
} from "~/components/ui/dialog";
import { Field } from "~/components/forms";
export default function FileManager() { export default function FileManager() {
return ( return (
<Authenticated key="dashboard" v3LegacyAuthProviderCompatible> <Authenticated key="dashboard" v3LegacyAuthProviderCompatible>
<Dialog> <GeneralLayout>
<GeneralLayout> <h1 className="font-bold mb-4 text-lg">File Manager</h1>
<h1 className="font-bold mb-4 text-lg">File Manager</h1> <FileCardList>
<FileCardList> <FileCard
<FileCard fileName="Backups"
fileName="Backups" size="33 files"
size="33 files" type={FileTypes.Folder}
type={FileTypes.Folder} createdAt="2 days ago"
createdAt="2 days ago" />
/> <FileCard
<FileCard fileName="Backups"
fileName="Backups" size="33 files"
size="33 files" type={FileTypes.Folder}
type={FileTypes.Folder} createdAt="2 days ago"
createdAt="2 days ago" />
/> <FileCard
<FileCard fileName="Backups"
fileName="Backups" size="33 files"
size="33 files" type={FileTypes.Folder}
type={FileTypes.Folder} createdAt="2 days ago"
createdAt="2 days ago" />
/> <FileCard
<FileCard fileName="Backups"
fileName="Backups" size="33 files"
size="33 files" type={FileTypes.Folder}
type={FileTypes.Folder} createdAt="2 days ago"
createdAt="2 days ago" />
/> </FileCardList>
</FileCardList> <h2 className="font-bold text-l mt-8">Files</h2>
<h2 className="font-bold text-l mt-8">Files</h2> <div className="flex items-center space-x-4 my-6 w-full">
<div className="flex items-center space-x-4 my-6 w-full"> <Input
<Input fullWidth
fullWidth leftIcon={<AddIcon />}
leftIcon={<AddIcon />} 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">
<Button className="h-12 gap-x-2"> <AddIcon />
<AddIcon /> Select All
Select All </Button>
</Button> <Button className="h-12 gap-x-2">
<DialogTrigger asChild> <AddIcon />
<Button className="h-12 gap-x-2"> New Folder
<AddIcon /> </Button>
Pin Content </div>
</Button> <DataTable
</DialogTrigger> columns={columns}
</div> />
<DataTable columns={columns} /> </GeneralLayout>
</GeneralLayout> </Authenticated>
<DialogHeader>
<DialogTitle>Pinning Contnet</DialogTitle>
</DialogHeader>
<DialogContent>
<form action="" className="w-full flex flex-col gap-y-4">
<Field
inputProps={{ name: "cids", placeholder: "Comma separated CIDs" }}
labelProps={{ htmlFor: "cids", children: "Content to Pin" }}
/>
<Button type="submit" className="w-full">
Pin Content
</Button>
</form>
</DialogContent>
</Dialog>
</Authenticated>
); );
} }

View File

@ -96,7 +96,7 @@ export default function Login() {
const LoginSchema = z.object({ const LoginSchema = z.object({
email: z.string().email(), email: z.string().email(),
password: z.string(), password: z.string(),
rememberMe: z.boolean().optional(), rememberMe: z.boolean(),
}); });
const LoginForm = () => { const LoginForm = () => {