diff --git a/src/app/App.tsx b/src/app/App.tsx index af1e021e..abb4d8ef 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -82,11 +82,6 @@ const FACE_LABELS: Record = { }; const STARTER_MATERIAL_ORDER = new Map(STARTER_MATERIAL_LIBRARY.map((material, index) => [material.id, index])); -const TOOL_LABELS = { - select: "Select", - "box-create": "Box Create", - play: "Play" -} as const; const DIAGNOSTIC_BADGE_LABELS = { document: "Document", @@ -374,7 +369,6 @@ export function App({ store, initialStatusMessage }: AppProps) { const [playerStartPositionDraft, setPlayerStartPositionDraft] = useState(createVec3Draft(DEFAULT_PLAYER_START_POSITION)); const [playerStartYawDraft, setPlayerStartYawDraft] = useState("0"); const [statusMessage, setStatusMessage] = useState(initialStatusMessage ?? "Slice 1.4 room-authoring workflow ready."); - const [persistenceMessage, setPersistenceMessage] = useState("Local Draft is the current browser persistence path. Export JSON creates a portable copy."); const [preferredNavigationMode, setPreferredNavigationMode] = useState( primaryPlayerStart === null ? "orbitVisitor" : "firstPerson" ); @@ -676,21 +670,11 @@ export function App({ store, initialStatusMessage }: AppProps) { const handleSaveDraft = () => { const result = store.saveDraft(); - setPersistenceMessage( - result.status === "saved" - ? "Local Draft saved. Refresh, reopen, or use Load Draft to restore this exact validated document." - : result.message - ); setStatusMessage(result.message); }; const handleLoadDraft = () => { const result = store.loadDraft(); - setPersistenceMessage( - result.status === "loaded" - ? "Local Draft loaded. The current in-memory document was replaced with the stored browser draft." - : result.message - ); setStatusMessage(result.message); }; @@ -706,11 +690,9 @@ export function App({ store, initialStatusMessage }: AppProps) { anchor.click(); URL.revokeObjectURL(objectUrl); - setPersistenceMessage("Exported a validated Scene Document JSON file for sharing or backup."); setStatusMessage("Scene document exported as JSON."); } catch (error) { const message = getErrorMessage(error); - setPersistenceMessage(message); setStatusMessage(message); } }; @@ -729,12 +711,9 @@ export function App({ store, initialStatusMessage }: AppProps) { try { const source = await file.text(); store.importDocumentJson(source); - setPersistenceMessage("Imported JSON replaced the current document after migration and validation. Save Draft to make it the browser draft."); setStatusMessage(`Imported ${file.name}.`); } catch (error) { - const message = getErrorMessage(error); - setPersistenceMessage(message); - setStatusMessage(message); + setStatusMessage(getErrorMessage(error)); } finally { event.currentTarget.value = ""; } @@ -1033,12 +1012,39 @@ export function App({ store, initialStatusMessage }: AppProps) { return (
-
-
WebEditor3D
-
Slice 1.4 first-room polish
-
+
+
+ + + + +
+
- - - -
-
- {persistenceMessage} -
-
- -