feat (ui) CSS

This commit is contained in:
kodi
2026-03-11 16:57:08 +01:00
parent 6e7b3cffae
commit 73e47f0466
8 changed files with 1224 additions and 85 deletions
Binary file not shown.
@@ -28,6 +28,10 @@ class UiSmokeGoldenTest(unittest.TestCase):
body = index_path.read_text(encoding="utf-8")
self.assertIn('id="workspace"', body)
self.assertIn('id="footer-bar"', body)
self.assertIn('id="title-zone-actions"', body)
self.assertIn('id="status"', body)
self.assertIn('id="theme-toggle"', body)
self.assertIn('id="theme-toggle-icon"', body)
self.assertIn('id="left-pane"', body)
self.assertIn('id="right-pane"', body)
self.assertIn('id="left-items"', body)
@@ -82,6 +86,9 @@ class UiSmokeGoldenTest(unittest.TestCase):
self.assertTrue((static_root / "style.css").exists())
app_js = (static_root / "app.js").read_text(encoding="utf-8")
self.assertIn('currentPath: "/Volumes"', app_js)
self.assertIn('const THEME_STORAGE_KEY = "webmanager-theme"', app_js)
self.assertIn("document.documentElement.dataset.theme", app_js)
self.assertIn('document.getElementById("theme-toggle").onclick = toggleTheme;', app_js)
self.assertIn('Cross-root directory move is not supported in v1', app_js)
self.assertIn('Batch directory move is not supported in v1', app_js)
self.assertIn('Batch move requires all selected items to be in the same root', app_js)
@@ -89,6 +96,10 @@ class UiSmokeGoldenTest(unittest.TestCase):
self.assertIn('sources: selectedItems.map((item) => item.path)', app_js)
self.assertIn("function rootKeyFromPath(path)", app_js)
self.assertIn("function isNestedPath(sourcePath, destinationPath)", app_js)
style_css = (static_root / "style.css").read_text(encoding="utf-8")
self.assertIn(':root[data-theme="dark"]', style_css)
self.assertIn(':root[data-theme="light"]', style_css)
self.assertIn('#theme-toggle', style_css)
app_js_url = app.url_path_for("ui", path="/app.js")
style_css_url = app.url_path_for("ui", path="/style.css")