diff --git a/frontend/src/components/maps/LocationMapBottomSheet.jsx b/frontend/src/components/maps/LocationMapBottomSheet.jsx index 39ce0c6..f9cddfc 100644 --- a/frontend/src/components/maps/LocationMapBottomSheet.jsx +++ b/frontend/src/components/maps/LocationMapBottomSheet.jsx @@ -29,6 +29,7 @@ export default function LocationMapBottomSheet({ history, future, saving, + savingAction, hasUnsavedChanges, mapState, onAddObject, @@ -74,6 +75,8 @@ export default function LocationMapBottomSheet({ const changedLayerCount = DISPLAY_CONTROLS.filter(([key]) => filters[key] !== DEFAULT_MAP_FILTERS[key]).length; const unmappedItemPreview = visibleUnmappedItems.slice(0, 8); const hiddenUnmappedItemCount = visibleUnmappedItems.length - unmappedItemPreview.length; + const saveDraftLabel = savingAction === "save" ? "Saving..." : "Save Draft"; + const publishLabel = savingAction === "publish" ? "Publishing..." : "Publish"; const showSelectedZoneItems = () => { setFilters((current) => ({ ...current, @@ -85,21 +88,23 @@ export default function LocationMapBottomSheet({ const editorActions = showEditorControls ? (
- +
- - - - + + + +
) : canManage && mapState?.published_map ? ( @@ -172,6 +177,7 @@ export default function LocationMapBottomSheet({ type="button" className={[editorTool === "pan" ? "active" : "", "is-pan"].filter(Boolean).join(" ")} onClick={onPanMode} + disabled={saving} > Pan @@ -179,6 +185,7 @@ export default function LocationMapBottomSheet({ type="button" className={[editorTool === "edit" ? "active" : "", "is-edit"].filter(Boolean).join(" ")} onClick={onEditObjects} + disabled={saving} > Objects @@ -191,6 +198,7 @@ export default function LocationMapBottomSheet({ Label onObjectField("label", event.target.value)} /> @@ -199,6 +207,7 @@ export default function LocationMapBottomSheet({ onZoneLinkChange(event.target.value)} > @@ -225,6 +235,7 @@ export default function LocationMapBottomSheet({ onObjectField("x", Number(event.target.value))} /> @@ -233,6 +244,7 @@ export default function LocationMapBottomSheet({ onObjectField("y", Number(event.target.value))} /> @@ -241,6 +253,7 @@ export default function LocationMapBottomSheet({ onObjectField("width", Number(event.target.value))} /> @@ -249,14 +262,15 @@ export default function LocationMapBottomSheet({ onObjectField("height", Number(event.target.value))} />
- - + +
) : mode === "edit" && editorTool === "edit" ? ( diff --git a/frontend/src/components/maps/LocationMapCanvas.jsx b/frontend/src/components/maps/LocationMapCanvas.jsx index a20f088..5ec636f 100644 --- a/frontend/src/components/maps/LocationMapCanvas.jsx +++ b/frontend/src/components/maps/LocationMapCanvas.jsx @@ -19,12 +19,13 @@ export default function LocationMapCanvas({ username, svgRef, dragState, + editingLocked = false, setDragState, setSelectedObjectKey, remember, updateObjects, }) { - const canEditObjects = mode === "edit" && editorTool === "edit"; + const canEditObjects = !editingLocked && mode === "edit" && editorTool === "edit"; const canDragPan = mode === "view" || editorTool === "pan"; const scrollRef = useRef(null); const panDragRef = useRef(null); diff --git a/frontend/src/components/maps/LocationMapSetupPanel.jsx b/frontend/src/components/maps/LocationMapSetupPanel.jsx index 721d07c..175dc7f 100644 --- a/frontend/src/components/maps/LocationMapSetupPanel.jsx +++ b/frontend/src/components/maps/LocationMapSetupPanel.jsx @@ -3,6 +3,7 @@ export default function LocationMapSetupPanel({ canManage, zoneCount = 0, saving, + savingAction, onContinue, onPreview, onPublish, @@ -20,6 +21,9 @@ export default function LocationMapSetupPanel({ const createFromZonesLabel = hasZones ? `Create From ${zoneCount} Zone${zoneCount === 1 ? "" : "s"}` : "Create From Zones"; + const createBlankLabel = savingAction === "create-blank" ? "Creating..." : "Create Blank Map"; + const createZonesButtonLabel = savingAction === "create-zones" ? "Creating..." : createFromZonesLabel; + const publishLabel = savingAction === "publish" ? "Publishing..." : "Publish Map"; return (
@@ -27,14 +31,14 @@ export default function LocationMapSetupPanel({

{description}

{hasAnyMap && canManage ? (
- -
) : !hasAnyMap && canManage ? ( @@ -47,7 +51,7 @@ export default function LocationMapSetupPanel({ {!hasZones ? ( <> )} diff --git a/frontend/src/components/maps/LocationMapToolbar.jsx b/frontend/src/components/maps/LocationMapToolbar.jsx index 84c1db7..3cd1a12 100644 --- a/frontend/src/components/maps/LocationMapToolbar.jsx +++ b/frontend/src/components/maps/LocationMapToolbar.jsx @@ -3,6 +3,7 @@ export default function LocationMapToolbar({ editorTool, hasAnyMap, canManage, + saving, zoom, setZoom, onFit, @@ -18,7 +19,7 @@ export default function LocationMapToolbar({