diff --git a/app/(marketing)/[slug]/page.tsx b/app/(marketing)/[slug]/page.tsx index 8dbb352..5a9478e 100644 --- a/app/(marketing)/[slug]/page.tsx +++ b/app/(marketing)/[slug]/page.tsx @@ -2,7 +2,6 @@ import fs from "fs"; import path from "path"; import matter from "gray-matter"; import { notFound } from "next/navigation"; -import * as Sentry from "@sentry/nextjs"; import MarkdownContent from "@/components/markdown-content"; export const dynamicParams = false; @@ -18,7 +17,6 @@ export async function generateStaticParams() { slug: file.replace(/\.mdx$/, ""), })); } catch (error) { - console.error("Error reading content directory:", error); return []; } } @@ -57,6 +55,7 @@ export default async function MarketingPage({ params: Promise<{ slug: string }>; }) { const { slug } = await params; + console.log("Generating page for slug:", slug); const filePath = path.join( process.cwd(), "content/marketing/", @@ -93,12 +92,7 @@ export default async function MarketingPage({ ); - } catch (error) { - Sentry.captureException(error); - console.error( - "Error reading file, this should have never happened:", - error, - ); + } catch { notFound(); } } diff --git a/app/manifest.ts b/app/manifest.ts new file mode 100644 index 0000000..8d21ad4 --- /dev/null +++ b/app/manifest.ts @@ -0,0 +1,25 @@ +import type { MetadataRoute } from "next"; + +export default function manifest(): MetadataRoute.Manifest { + return { + name: "Pegna AI", + short_name: "pegna ai", + description: "The best chatbot in the world.", + start_url: "/chat", + display: "standalone", + background_color: "#ffffff", + theme_color: "#000000", + icons: [ + { + src: "/logo-192.png", + sizes: "192x192", + type: "image/png", + }, + { + src: "/logo-512.png", + sizes: "512x512", + type: "image/png", + }, + ], + }; +} diff --git a/app/settings/sync/delete-all-data-button.tsx b/app/settings/sync/delete-all-data-button.tsx index a382fa1..7fa7d3a 100644 --- a/app/settings/sync/delete-all-data-button.tsx +++ b/app/settings/sync/delete-all-data-button.tsx @@ -6,10 +6,21 @@ import { Trash2 } from "lucide-react"; import { toast } from "sonner"; import { deleteAllServerData } from "./actions"; import { chatDB } from "@/lib/localDb"; -import { useContext } from "react"; +import { useContext, useState } from "react"; import { SyncDataContext } from "@/components/sync-data-provider"; +import { + AlertDialog, + AlertDialogAction, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, +} from "@/components/ui/alert-dialog"; export default function DeleteAllDataButton() { + const [showDeleteAllDialog, setShowDeleteAllDialog] = useState(false); const syncEngine = useContext(SyncDataContext); const deleteDataMutation = useMutation({ @@ -30,15 +41,43 @@ export default function DeleteAllDataButton() { }, }); + function onConfirm() { + setShowDeleteAllDialog(false); + deleteDataMutation.mutate(); + } + return ( - + <> + + + + + + Do you really want to delete all your user data? + + + This will permanently delete all your user data from the server + and your browser, including all chats, images, and documents. It + won't delete your account or settings. This action cannot be + undone. + + + + setShowDeleteAllDialog(false)}> + Cancel + + Confirm + + + + ); } diff --git a/public/logo-192.png b/public/logo-192.png new file mode 100644 index 0000000..2326bf6 Binary files /dev/null and b/public/logo-192.png differ