load diagram in read only mode from previous version

This commit is contained in:
1ilit
2025-07-19 21:11:58 +04:00
parent 8f121667f1
commit b9da7e618f
26 changed files with 282 additions and 80 deletions

View File

@@ -257,6 +257,7 @@ function EditPopoverContent({ data }) {
const { updateArea, deleteArea } = useAreas();
const { setUndoStack, setRedoStack } = useUndoRedo();
const { t } = useTranslation();
const {layout} = useLayout();
const initialColorRef = useRef(data.color);
const handleColorPick = (color) => {
@@ -302,6 +303,7 @@ function EditPopoverContent({ data }) {
value={data.name}
placeholder={t("name")}
className="me-2"
readOnly={layout.readOnly}
onChange={(value) => updateArea(data.id, { name: value })}
onFocus={(e) => setEditField({ name: e.target.value })}
onBlur={(e) => {
@@ -325,6 +327,7 @@ function EditPopoverContent({ data }) {
/>
<ColorPicker
usePopover={true}
readOnly={true}
value={data.color}
onChange={(color) => updateArea(data.id, { color })}
onColorPick={(color) => handleColorPick(color)}