From 381a359cb281b5c8067fa9b578b6d27811178ad4 Mon Sep 17 00:00:00 2001 From: AI Bot Date: Wed, 12 Aug 2026 12:48:17 +0530 Subject: [PATCH] feat: force project naming on creation and integrate autosave from start --- src/pages/Dashboard.tsx | 20 +++++++++++- src/pages/Editor.tsx | 67 +++++++++++++++++------------------------ 2 files changed, 46 insertions(+), 41 deletions(-) diff --git a/src/pages/Dashboard.tsx b/src/pages/Dashboard.tsx index 82542cc..a773f53 100644 --- a/src/pages/Dashboard.tsx +++ b/src/pages/Dashboard.tsx @@ -43,6 +43,24 @@ export default function Dashboard() { } }; + const handleNewProject = async () => { + const name = prompt('Enter a name for the new project:'); + if (!name || name.trim() === '') return; + + try { + const res = await api.saveProject({ + name: name.trim(), + scene_data: {} + }); + if (res.id) { + navigate(`/editor/${res.id}`); + } + } catch (err) { + console.error('Failed to create project', err); + alert('Failed to create project'); + } + }; + const handleSignOut = async () => { await signOut(); navigate('/'); @@ -90,7 +108,7 @@ export default function Dashboard() {

Your Projects