diff --git a/app/routers/dashboard.py b/app/routers/dashboard.py index d892790..1983258 100644 --- a/app/routers/dashboard.py +++ b/app/routers/dashboard.py @@ -173,8 +173,25 @@ def _sidebar_data(request: Request, repos: list[dict], include_workspace: bool = "gitea_linked": gitea_linked, "github_linked": github_linked, "has_active_workspace": has_active_workspace, + "app_version": "4.0.3", } + # List local workspaces for user menu + local_workspaces = [] + if user: + try: + with get_conn() as conn: + ws_rows = conn.execute( + "SELECT id, name FROM workspaces WHERE owner_id = ? ORDER BY name", + (user["id"],) + ).fetchall() + local_workspaces = [{"id": r["id"], "name": r["name"]} for r in ws_rows] + except Exception: + pass + sidebar["local_workspaces"] = local_workspaces + + return sidebar + @router.get("/trash", response_class=HTMLResponse) async def trash_page(request: Request, owner: str = Query(default=""), repo: str = Query(default="")): diff --git a/app/templates/_icons.html b/app/templates/_icons.html new file mode 100644 index 0000000..48df1b2 --- /dev/null +++ b/app/templates/_icons.html @@ -0,0 +1,66 @@ +{# FlowDeck — Outline SVG Icon Set (v4.0+) + Usage: {{ fd_icon('folder') }} {{ fd_icon('star', 16) }} + All icons use stroke="currentColor" for theme compatibility. +#} +{%- macro fd_icon(name, size=18) -%} +{%- set s = size|string -%} +{%- if name == 'folder' -%} + +{%- elif name == 'file' -%} + +{%- elif name == 'calendar' -%} + +{%- elif name == 'clock' -%} + +{%- elif name == 'star' -%} + +{%- elif name == 'bot' -%} + +{%- elif name == 'users' -%} + +{%- elif name == 'globe' -%} + +{%- elif name == 'lock' -%} + +{%- elif name == 'book' -%} + +{%- elif name == 'check-square' -%} + +{%- elif name == 'trash' -%} + +{%- elif name == 'help-circle' -%} + +{%- elif name == 'settings' -%} + +{%- elif name == 'refresh' -%} + +{%- elif name == 'log-out' -%} + +{%- elif name == 'message-square' -%} + +{%- elif name == 'home' -%} + +{%- elif name == 'search' -%} + +{%- elif name == 'link' -%} + +{%- elif name == 'plus' -%} + +{%- elif name == 'chevron-down' -%} + +{%- elif name == 'inbox' -%} + +{%- elif name == 'edit' -%} + +{%- elif name == 'copy' -%} + +{%- elif name == 'eye' -%} + +{%- elif name == 'share' -%} + +{%- elif name == 'more-horizontal' -%} + +{%- elif name == 'x' -%} + +{%- endif -%} +{%- endmacro -%} diff --git a/app/templates/base.html b/app/templates/base.html index 6c3a526..5785d1f 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -140,6 +140,8 @@ {% endif %} {% endmacro %} +{% from '_icons.html' import fd_icon %} +