feat: drag-reorder slots

pool.reorder() permutes slots (validated permutation) and keeps the
active selection on its slot; exposed via /grid_pool/reorder. The grid
thumbnails are drag handles; dropping on another cell reorders.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-21 15:12:53 +02:00
parent b115a0d449
commit 25e89ada2b
6 changed files with 91 additions and 0 deletions
+7
View File
@@ -60,6 +60,13 @@ async def _set_mask(request):
return web.json_response(m)
@routes.post("/grid_pool/reorder")
async def _reorder(request):
body = await request.json()
order = [int(i) for i in body["order"]]
return web.json_response(handlers.handle_reorder(_base(), body["pool_id"], order))
@routes.get("/grid_pool/list")
async def _list(request):
pool_id = request.query.get("pool_id", "default")