feat: 实现文件夹和书签的持久排序与拖拽功能

This commit is contained in:
2026-01-18 23:33:31 +08:00
parent 6eb3c730bb
commit dbeb181e5d
49 changed files with 3141 additions and 507 deletions

View File

@@ -0,0 +1,18 @@
# Change: Add persistent drag-and-drop sorting (folders + bookmarks)
## Why
Users need to reorder folders and bookmarks via drag-and-drop (including mobile/touch) and have that order persist across reloads. Current HTML5 drag/drop is unreliable on mobile and ordering is not stored for bookmarks.
## What Changes
- Add persistent ordering for bookmarks (new DB column and API endpoint to reorder within a folder).
- Use a touch-friendly drag-and-drop implementation in the web UI for:
- Reordering folders within the same parent.
- Reordering bookmarks within the same folder.
- Keep the root group (no folder) as a first-class group in the UI.
## Impact
- Affected specs: API (OpenAPI-backed)
- Affected code:
- Server: migrations, bookmarks routes, admin routes, row DTO mapping
- Web: MyPage and AdminPage UI ordering and drag/drop
- OpenAPI: Bookmark schema and reorder endpoint