fix: Gitea sidebar now has separate Repository section below Private
FlowDeck CI / test (push) Failing after 4s
FlowDeck CI / docker (push) Has been skipped

Backend:
- _sidebar_data() no longer clears workspace_pages for Gitea workspaces
  The local tree stays intact in the 'Private' section
- workspace_pages is always loaded from DB (local files)

Sidebar template (base.html):
- Workspace section renamed to 'Private' when gitea_workspace is true
- New 'Repository (Gitea)' section added below, visible only for Gitea
  workspaces, with its own toggle (sectionsOpen.gitea) and refresh button
- Uses #sidebar-gitea-items container for the remote file tree

Gitea workspace:
- loadSidebarTree() now targets #sidebar-gitea-items
- window._gwData exposed for sidebar refresh button
- sectionsOpen now includes gitea: true by default
This commit is contained in:
2026-07-16 13:44:10 -04:00
parent f61f8b61ae
commit 7613129204
3 changed files with 33 additions and 10 deletions
+2 -1
View File
@@ -76,13 +76,14 @@ def _sidebar_data(request: Request, repos: list[dict], include_workspace: bool =
if include_workspace and ws_cookie and ws_cookie.startswith("gitea:"):
# Gitea workspace: set owner/repo for client-side tree loading
# BUT keep local workspace pages — they go in the "Private" section
parts = ws_cookie.split(":", 2)
if len(parts) >= 3:
gitea_owner = parts[1]
gitea_repo = parts[2]
active_ws_name = f"{gitea_owner}/{gitea_repo}"
gitea_workspace = True
workspace_pages = [] # loaded client-side
# workspace_pages stays as-is (local tree, loaded above)
elif include_workspace and ws_cookie and user:
try:
wsi = int(ws_cookie)