fix(site-builder): honest save state (dirty tracking, status pill, beforeunload, error notice)
Track dirty from Craft node changes and page/design/header/footer state, cleared only by a successful save. Persistent Unsaved/Saving/Saved/Published/Save failed pill, beforeunload prompt while dirty or saving, one persistent error notice, resp.ok/non-JSON handling for save and publish, and publish refuses to run after a failed save. Draft badge no longer flips on a no-op autosave. Refs #30 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
a406ff8548
commit
9418444916
12 files changed
+842
-170
No files matched your search
@@ -13,6 +13,7 @@ import { useIsMobile } from '../hooks/useIsMobile';
|
||||
import { MobileChromeProvider } from '../state/MobileChromeContext';
|
||||
import { LayerFocusProvider } from '../panels/left/LayerFocusContext';
|
||||
import { LoadGate } from './LoadGate';
|
||||
import { DirtyTracker } from './DirtyTracker';
|
||||
import { DeviceMode } from '../types';
|
||||
|
||||
const SHOW_GUIDES_STORAGE_KEY = 'craft-show-guides';
|
||||
@@ -88,6 +89,7 @@ export const EditorShell: React.FC = () => {
|
||||
<LayerFocusProvider>
|
||||
<div className="editor-app">
|
||||
<LoadGate />
|
||||
<DirtyTracker />
|
||||
<TopBar
|
||||
device={device}
|
||||
onDeviceChange={setDevice}
|
||||
|
||||
Reference in new issue
Block a user