From 20f0bf29bfda0a1f162805de642f1de08b52fd9a Mon Sep 17 00:00:00 2001 From: Keith Solomon Date: Tue, 22 Jul 2025 10:05:57 -0500 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8feature:=20Set=20up=20post=20editing,?= =?UTF-8?q?=20modify=20add=20for=20proper=20sidebar.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/PromptCard.astro | 6 +- .../{Sidebar.astro => SidebarAdd.astro} | 0 src/components/SidebarEdit.astro | 17 ++ src/pages/add.astro | 6 +- src/pages/edit.astro | 156 ++++++++++++++++++ 5 files changed, 181 insertions(+), 4 deletions(-) rename src/components/{Sidebar.astro => SidebarAdd.astro} (100%) create mode 100644 src/components/SidebarEdit.astro create mode 100644 src/pages/edit.astro diff --git a/src/components/PromptCard.astro b/src/components/PromptCard.astro index b6bd4f2..db22a3a 100644 --- a/src/components/PromptCard.astro +++ b/src/components/PromptCard.astro @@ -44,7 +44,11 @@ const formatDate = (dateStr: string | undefined) => {
View Details
-

Prompt

+
+

Prompt

+ + Edit +

{description}


Created: {formatDate(created_at)} • Updated: {formatDate(updated_at)}

diff --git a/src/components/Sidebar.astro b/src/components/SidebarAdd.astro similarity index 100% rename from src/components/Sidebar.astro rename to src/components/SidebarAdd.astro diff --git a/src/components/SidebarEdit.astro b/src/components/SidebarEdit.astro new file mode 100644 index 0000000..e6e4e89 --- /dev/null +++ b/src/components/SidebarEdit.astro @@ -0,0 +1,17 @@ +--- +// Sidebar.astro +--- + + diff --git a/src/pages/add.astro b/src/pages/add.astro index 70f8831..50c9a78 100644 --- a/src/pages/add.astro +++ b/src/pages/add.astro @@ -1,6 +1,6 @@ --- import "../styles/global.css"; -import Sidebar from "../components/Sidebar.astro"; +import Sidebar from "../components/SidebarAdd.astro"; const supabaseUrl = import.meta.env.PUBLIC_SUPABASE_URL; const supabaseKey = import.meta.env.PUBLIC_SUPABASE_ANON_KEY; @@ -58,7 +58,7 @@ const supabaseKey = import.meta.env.PUBLIC_SUPABASE_ANON_KEY;
- +
@@ -66,7 +66,7 @@ const supabaseKey = import.meta.env.PUBLIC_SUPABASE_ANON_KEY;
- diff --git a/src/pages/edit.astro b/src/pages/edit.astro new file mode 100644 index 0000000..636a3b7 --- /dev/null +++ b/src/pages/edit.astro @@ -0,0 +1,156 @@ +--- +import "../styles/global.css"; +import Sidebar from "../components/SidebarEdit.astro"; + +const supabaseUrl = import.meta.env.PUBLIC_SUPABASE_URL; +const supabaseKey = import.meta.env.PUBLIC_SUPABASE_ANON_KEY; +--- + + + + Prompt Catalog - Edit Prompt + + + + + +
+

Prompt Catalog - Add New Prompt

+

Add a new AI prompt to the catalog

+
+ +
+ + +
+
+
Loading...
+
+
+
+ + + +