From 5372f4f22f44b0d29c6ed9295e07ec4754c326ff Mon Sep 17 00:00:00 2001 From: bruno Date: Mon, 20 Jul 2026 20:18:50 -0400 Subject: [PATCH] feat: outline SVG icons + version + workspaces in user menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - _icons.html: 25 outline SVG icons (Feather/Lucide style, stroke=currentColor) - base.html: toutes les icônes emoji remplacées par {{ fd_icon() }} - Sidebar sections, empty states, user menu, footer links, context menu - JS getSvgIcon() helper pour rendu dynamique - User menu: ajout version (FlowDeck v4.0.3) + liste workspaces locaux - Entre Switch workspace et Log out, avec ✓ sur le workspace actif - dashboard.py: _sidebar_data enrichi (app_version, local_workspaces) - CSS: .page-icon-svg, .um-version, .um-section-label, .um-item svg - Dark + light theme compatible (stroke:currentColor) - 143 tests passent --- app/routers/dashboard.py | 17 ++++++++ app/templates/_icons.html | 66 ++++++++++++++++++++++++++++ app/templates/base.html | 92 +++++++++++++++++++++++++-------------- static/css/app.css | 15 +++++++ 4 files changed, 158 insertions(+), 32 deletions(-) create mode 100644 app/templates/_icons.html 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 %} +