page.tsx 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. "use client";
  2. import Image from "next/image";
  3. import { UploadForm } from "../components/uploadForm";
  4. import { FilesTable } from "../components/filesTable";
  5. export default function FilesPage() {
  6. return (
  7. <div className="grid grid-rows-[20px_1fr_20px] items-center justify-items-center min-h-screen p-8 pb-20 gap-16 sm:p-20 font-[family-name:var(--font-geist-sans)]">
  8. <main className="flex flex-col gap-8 row-start-2 items-center sm:items-start">
  9. <Image
  10. className="dark:invert"
  11. src="/vtorio.svg"
  12. alt="Vtor.io logo"
  13. width={180}
  14. height={38}
  15. priority
  16. />
  17. <h1 className="text-3xl font-bold text-center sm:text-left">
  18. File Management
  19. </h1>
  20. <p className="text-sm text-center sm:text-left max-w-[600px]">
  21. Upload and manage your media files here. Select files to upload them to the server.
  22. </p>
  23. <div className="flex flex-col gap-4 items-center sm:items-start">
  24. <h2 className="text-xl font-semibold">Upload Files</h2>
  25. <UploadForm />
  26. </div>
  27. <div className="w-full max-w-6xl">
  28. <h2 className="text-2xl font-semibold mb-4">Files in Database</h2>
  29. <FilesTable />
  30. </div>
  31. <div className="flex gap-4 items-center flex-col sm:flex-row">
  32. <a
  33. className="rounded-full border border-solid border-transparent transition-colors flex items-center justify-center bg-foreground text-background gap-2 hover:bg-[#383838] dark:hover:bg-[#ccc] text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5"
  34. href="/"
  35. >
  36. Back to Home
  37. </a>
  38. <a
  39. className="rounded-full border border-solid border-black/[.08] dark:border-white/[.145] transition-colors flex items-center justify-center hover:bg-[#f2f2f2] dark:hover:bg-[#1a1a1a] hover:border-transparent text-sm sm:text-base h-10 sm:h-12 px-4 sm:px-5"
  40. href="/api-docs"
  41. >
  42. API Documentation
  43. </a>
  44. </div>
  45. </main>
  46. </div>
  47. );
  48. }