diff --git a/.gitignore b/.gitignore index 8786491..a35c7d9 100644 --- a/.gitignore +++ b/.gitignore @@ -50,3 +50,4 @@ workspace.json aichat.data.json composer_data.json +bun.lockb diff --git a/next.config.js b/next.config.js index b4e2f03..9a6d7d7 100644 --- a/next.config.js +++ b/next.config.js @@ -1,8 +1,8 @@ /** @type {import('next').NextConfig} */ const nextConfig = { - experimental: { - serverActions: true, - }, + // experimental: { + // serverActions: true, + // }, } module.exports = nextConfig \ No newline at end of file diff --git a/package.json b/package.json index a10105f..9b7ab74 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "date-fns": "^4.1.0", "isomorphic-dompurify": "^2.16.0", "jspdf": "^2.5.2", + "jszip": "^3.10.1", "lucide-react": "^0.454.0", "marked": "^14.1.3", "next": "14.2.16", diff --git a/src/components/download-all-menu.tsx b/src/components/download-all-menu.tsx new file mode 100644 index 0000000..4d4af83 --- /dev/null +++ b/src/components/download-all-menu.tsx @@ -0,0 +1,40 @@ +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "@/components/ui/dropdown-menu" +import { Button } from "@/components/ui/button" +import { Download } from "lucide-react" +import { downloadAllAsZip } from "@/lib/download" +import { Tooltip, TooltipContent, TooltipTrigger } from "./ui/tooltip" + +export function DownloadAllMenu() { + return ( + + + + + + + + downloadAllAsZip('markdown')}> + Download All as Markdown + + downloadAllAsZip('html')}> + Download All as HTML + + downloadAllAsZip('pdf')}> + Download All as PDF + + + + + + Download All Logs + + + ) +} \ No newline at end of file diff --git a/src/components/navbar.tsx b/src/components/navbar.tsx index 1d7bc59..3d70e5f 100644 --- a/src/components/navbar.tsx +++ b/src/components/navbar.tsx @@ -8,6 +8,7 @@ import { Tooltip, TooltipContent, TooltipTrigger } from "./ui/tooltip" import { Input } from "./ui/input" import { useRouter, usePathname } from "next/navigation" import { useState } from "react" +import { DownloadAllMenu } from "./download-all-menu" export function Navbar() { const router = useRouter() @@ -60,6 +61,8 @@ export function Navbar() { )} + +