fix: Library page — hover effects, workspace filter, tree, rename
1. Hover effects fixed: converted table to div-based flexbox layout (tr/td don't support display:flex). .lib-row now properly shows drag handle, checkbox, and OPEN button on hover. 2. Recents filter by workspace: /api/library/recents now accepts workspace_id parameter. Template passes active_workspace_id from sidebar context to API calls. 3. Tree hierarchy: API now enriches items with has_children via _enrich_children() batch query — shows expand chevrons for pages with sub-pages. 4. Rename on click: single click on title starts inline rename (was opening page). OPEN button still opens side peek. 5. Code cleanup: extracted _enrich_children() helper to eliminate duplicate code across 6 endpoints.
This commit is contained in:
@@ -220,6 +220,7 @@ async def library_page(request: Request, owner: str = Query(default=""), repo: s
|
||||
sidebar["nav_workspace_id"] = ws["id"] if ws else 0
|
||||
|
||||
template = env.get_template("library.html")
|
||||
sidebar["active_workspace_id"] = sidebar.get("nav_workspace_id", 0)
|
||||
return template.render(**sidebar)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user