Add category rename and drag-and-drop reordering in edit mode

- Edit toggle behind the "Kategorien" title enables an edit mode.
- In edit mode all category tiles become inline rename fields (no outline,
  distinct background, small margins); articles and "new article" are hidden.
- Rename via PATCH /api/category/:id; reorder via PUT /api/category/order
  (parentId + categoryIds) with SortableJS.
- Only call backend when order actually changed; revert DOM order on error
  so further dragging keeps working.
- Redux: renameCategory + reorderCategories thunks, renameMode state.
This commit is contained in:
seb
2026-08-02 19:43:38 +02:00
parent 5309b1174b
commit 2dd14bac91
7 changed files with 180 additions and 3 deletions

View File

@@ -26,6 +26,7 @@
"react-dom": "^19.2.8",
"react-redux": "^9.3.0",
"react-router-dom": "^7.18.2",
"sortablejs": "^1.15.7",
"thumbhash": "^0.1.1"
},
"devDependencies": {