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:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user