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):
Organize your work into separate workspaces. Each has its own pages and files.