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:
@@ -10,3 +10,15 @@ body {
|
||||
overscroll-behavior-y: none;
|
||||
touch-action: manipulation;
|
||||
}
|
||||
|
||||
/* SortableJS: Kategorie-Reorder im Edit-Modus */
|
||||
.sortable-ghost {
|
||||
outline: 2px dashed #2e7d32;
|
||||
outline-offset: 2px;
|
||||
background-color: rgba(46, 125, 50, 0.12) !important;
|
||||
}
|
||||
|
||||
.sortable-drag {
|
||||
opacity: 1 !important;
|
||||
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user