fix: workspace_key set from cookie → 🔗 icon on homepage for remote workspaces
This commit is contained in:
@@ -70,6 +70,8 @@ def _sidebar_data(request: Request, repos: list[dict]) -> dict:
|
|||||||
active_ws_name = "Workspace"
|
active_ws_name = "Workspace"
|
||||||
workspace_pages = []
|
workspace_pages = []
|
||||||
gitea_workspace = False
|
gitea_workspace = False
|
||||||
|
gitea_owner = ""
|
||||||
|
gitea_repo = ""
|
||||||
|
|
||||||
if ws_cookie and ws_cookie.startswith("gitea:"):
|
if ws_cookie and ws_cookie.startswith("gitea:"):
|
||||||
# Gitea workspace: set owner/repo for client-side tree loading
|
# Gitea workspace: set owner/repo for client-side tree loading
|
||||||
@@ -114,6 +116,7 @@ def _sidebar_data(request: Request, repos: list[dict]) -> dict:
|
|||||||
return {
|
return {
|
||||||
"workspace_name": ws, "workspace_initial": initial,
|
"workspace_name": ws, "workspace_initial": initial,
|
||||||
"active_ws_name": active_ws_name,
|
"active_ws_name": active_ws_name,
|
||||||
|
"workspace_key": f"{gitea_owner}/{gitea_repo}" if gitea_workspace else "",
|
||||||
"workspace_pages": workspace_pages,
|
"workspace_pages": workspace_pages,
|
||||||
"gitea_workspace": gitea_workspace,
|
"gitea_workspace": gitea_workspace,
|
||||||
"current_page": "Dashboard", "last_edited": "now",
|
"current_page": "Dashboard", "last_edited": "now",
|
||||||
|
|||||||
Reference in New Issue
Block a user