diff --git a/app/db.py b/app/db.py index 17612b1..307dca5 100644 --- a/app/db.py +++ b/app/db.py @@ -192,7 +192,7 @@ def init_db(): id INTEGER PRIMARY KEY AUTOINCREMENT, collection_id INTEGER NOT NULL REFERENCES collections(id) ON DELETE CASCADE, title TEXT NOT NULL DEFAULT '', - icon TEXT DEFAULT '๐Ÿ“„', + icon TEXT DEFAULT 'file', position INTEGER NOT NULL DEFAULT 0, parent_id INTEGER REFERENCES collection_pages(id), gitea_issue_id INTEGER, diff --git a/app/routers/board.py b/app/routers/board.py index eefdbef..3a887aa 100644 --- a/app/routers/board.py +++ b/app/routers/board.py @@ -63,7 +63,7 @@ def _map_issue_to_card(issue: dict, owner: str = "", repo: str = "") -> dict: "bug": "๐Ÿ›", "feature": "โœจ", "enhancement": "โšก", "documentation": "๐Ÿ“„", "design": "๐ŸŽจ", "testing": "๐Ÿงช", "refactor": "๐Ÿ”ง", "security": "๐Ÿ”’", } - icon = "๐Ÿ“„" + icon = "file" for lbl in labels: for kw, emoji in icon_map.items(): if kw in lbl.get("name", "").lower(): @@ -142,27 +142,27 @@ def _build_page_tree(conn, parent_id: int | None, ws_key: str, depth: int = 0, m def _file_icon(name: str, content_format: str = "") -> str: - """Map file extension to emoji icon.""" + """Map file extension to icon name (SVG-safe).""" import re # FlowDeck internal pages (no extension) if content_format and content_format != 'file': - return '๐Ÿ“' + return 'edit' n = name.lower() - if re.search(r'\.(png|jpe?g|gif|webp|svg|bmp|ico)$', n): return '๐Ÿ–ผ๏ธ' - if n.endswith('.pdf'): return '๐Ÿ“•' - if re.search(r'\.(md|markdown)$', n): return '๐Ÿ“' - if n.endswith('.py'): return '๐Ÿ' - if re.search(r'\.(js|jsx|ts|tsx)$', n): return '๐Ÿ“œ' - if re.search(r'\.(html?|xml)$', n): return '๐ŸŒ' - if n.endswith('.css'): return '๐ŸŽจ' - if n.endswith('.json'): return '๐Ÿ“‹' - if n.endswith('.sql'): return '๐Ÿ—ƒ๏ธ' - if re.search(r'\.(sh|bash|zsh)$', n): return '๐Ÿ’ป' - if n.endswith('.ps1'): return 'โšก' - if re.search(r'\.(rs|go|java|rb|php|c|cpp|h|swift|kt|scala|r)$', n): return '๐Ÿ“œ' - if re.search(r'\.(txt|log)$', n): return '๐Ÿ“„' - if re.search(r'\.(zip|tar|gz|rar|7z)$', n): return '๐Ÿ“ฆ' - return '๐Ÿ“„' + if re.search(r'\.(png|jpe?g|gif|webp|svg|bmp|ico)$', n): return 'image' + if n.endswith('.pdf'): return 'file' + if re.search(r'\.(md|markdown)$', n): return 'edit' + if n.endswith('.py'): return 'file' + if re.search(r'\.(js|jsx|ts|tsx)$', n): return 'file' + if re.search(r'\.(html?|xml)$', n): return 'file' + if n.endswith('.css'): return 'file' + if n.endswith('.json'): return 'file' + if n.endswith('.sql'): return 'file' + if re.search(r'\.(sh|bash|zsh)$', n): return 'file' + if n.endswith('.ps1'): return 'file' + if re.search(r'\.(rs|go|java|rb|php|c|cpp|h|swift|kt|scala|r)$', n): return 'file' + if re.search(r'\.(txt|log)$', n): return 'file' + if re.search(r'\.(zip|tar|gz|rar|7z)$', n): return 'file' + return 'file' def _load_workspace_pages(ws_cookie: str) -> list: diff --git a/app/routers/dashboard.py b/app/routers/dashboard.py index 48e45ec..d76c884 100644 --- a/app/routers/dashboard.py +++ b/app/routers/dashboard.py @@ -96,7 +96,7 @@ def _sidebar_data(request: Request, repos: list[dict], include_workspace: bool = recent_pages.append({ "id": full_name, "name": repo.get("name", full_name), - "icon": "๐Ÿ“", + "icon": "folder", "url": f"/board/{full_name}", "active": False, "indent": 0, @@ -430,7 +430,7 @@ async def help_page(request: Request):
-

๐Ÿ“Workspaces

+

{{ fd_icon("folder",16) }}Workspaces

Organize your work into separate workspaces. Each has its own pages and files.