Add multi-tag filtering with active tag display, optimize directory browsing performance, and improve mobile editor UI

This commit is contained in:
2026-03-21 21:52:58 -04:00
parent 0ba58115a2
commit 7fbf0f07ef
5 changed files with 218 additions and 62 deletions
+10 -7
View File
@@ -114,13 +114,16 @@ async def api_browse(vault_name: str, path: str = ""):
continue
rel = str(entry.relative_to(vault_root)).replace("\\", "/")
if entry.is_dir():
# Count all supported files recursively (skip hidden dirs)
file_count = sum(
1 for f in entry.rglob("*")
if f.is_file()
and not any(p.startswith(".") for p in f.relative_to(entry).parts)
and (f.suffix.lower() in SUPPORTED_EXTENSIONS or f.name.lower() in ("dockerfile", "makefile"))
)
# Count only direct children (files and subdirs) for performance
try:
file_count = sum(
1 for child in entry.iterdir()
if not child.name.startswith(".")
and (child.is_file() and (child.suffix.lower() in SUPPORTED_EXTENSIONS or child.name.lower() in ("dockerfile", "makefile"))
or child.is_dir())
)
except PermissionError:
file_count = 0
items.append({
"name": entry.name,
"path": rel,