diff --git a/app/routers/dashboard.py b/app/routers/dashboard.py index 2868cb9..ef07482 100644 --- a/app/routers/dashboard.py +++ b/app/routers/dashboard.py @@ -127,6 +127,19 @@ def _sidebar_data(request: Request, repos: list[dict]) -> dict: except Exception: pass + # Private pages for mirror workspace (when Gitea remote active) + private_pages = [] + if gitea_workspace and local_ws_id: + try: + with get_conn() as conn: + pp_rows = conn.execute( + "SELECT id, title FROM pages WHERE parent_section='Private' AND workspace_id=? AND deleted_at IS NULL ORDER BY updated_at DESC LIMIT 20", + (local_ws_id,) + ).fetchall() + private_pages = [{"id": r[0], "title": r[1] or "Untitled"} for r in pp_rows] + except Exception: + pass + return { "workspace_name": ws, "workspace_initial": initial, "active_ws_name": active_ws_name, @@ -136,7 +149,7 @@ def _sidebar_data(request: Request, repos: list[dict]) -> dict: "gitea_workspace": gitea_workspace, "current_page": "Dashboard", "last_edited": "now", "recent_pages": recent_pages, - "private_pages": [], + "private_pages": private_pages, "favorite_pages": [], "shared_pages": [], "published_pages": [],