fix: workspace — removed topbar buttons, unified modals, parent_id support
FlowDeck CI / test (push) Failing after 4s
FlowDeck CI / docker (push) Has been skipped

- Topbar: removed New File/New Folder buttons + 'Files' label
- Breadcrumb: Workspace / work1 instead of work1 / Files
- Modals: single shared create modal with focus auto, @keydown.enter
- parent_id param: recursive folder/file creation inside folders
- Sidebar buttons use same POST /api/local-workspace/items
- newPageInWorkspace/newFolderInWorkspace now both use unified API
This commit is contained in:
2026-07-10 20:24:05 -04:00
parent eddb69e58e
commit 0c54db66ac
3 changed files with 90 additions and 86 deletions
+4 -3
View File
@@ -545,14 +545,15 @@ async def create_local_workspace_item(request: Request):
body = await request.json()
name = body.get("name", "Untitled").strip()
item_type = body.get("type", "page")
parent_id = body.get("parent_id")
ws = _get_active_workspace(request)
ws_id = ws["id"] if ws else None
section = 'Workspace' if item_type == 'folder' else 'Private'
with get_conn() as conn:
cursor = conn.execute(
"INSERT INTO pages (workspace, workspace_id, title, content, content_format, parent_section) "
"VALUES ('', ?, ?, '', 'blocks', ?)",
(ws_id, name, section),
"INSERT INTO pages (workspace, workspace_id, title, content, content_format, parent_section, parent_id) "
"VALUES ('', ?, ?, '', 'blocks', ?, ?)",
(ws_id, name, section, parent_id),
)
conn.commit()
pid = cursor.lastrowid