From 17291b0cb27ee003ee137fa4a171fe3873a668a7 Mon Sep 17 00:00:00 2001 From: Jennifer Taylor Date: Sat, 3 Dec 2022 22:02:37 +0000 Subject: [PATCH] Initial stab at fixing dark mode. Navigation and main colors are now better. Laid the groundwork for theme-based assets and fixed loading spinners for dark mode. --- bemani/frontend/app.py | 3 +++ .../frontend/static/components/add.react.js | 1 + .../static/components/delete.react.js | 1 + .../frontend/static/components/edit.react.js | 1 + .../static/components/gamesettings.react.js | 2 +- .../frontend/static/components/table.react.js | 2 +- .../static/controllers/admin/api.react.js | 2 +- .../static/controllers/admin/users.react.js | 2 +- .../static/controllers/arcade/arcade.react.js | 6 +++--- .../static/controllers/ddr/rivals.react.js | 2 +- .../static/controllers/ddr/scores.react.js | 2 +- .../static/controllers/ddr/settings.react.js | 6 +++--- .../static/controllers/iidx/player.react.js | 2 +- .../static/controllers/iidx/rivals.react.js | 2 +- .../static/controllers/iidx/scores.react.js | 2 +- .../static/controllers/iidx/settings.react.js | 6 +++--- .../static/controllers/jubeat/rivals.react.js | 2 +- .../static/controllers/jubeat/scores.react.js | 2 +- .../controllers/jubeat/settings.react.js | 2 +- .../static/controllers/museca/scores.react.js | 2 +- .../static/controllers/popn/rivals.react.js | 4 ++-- .../static/controllers/popn/scores.react.js | 2 +- .../static/controllers/reflec/rivals.react.js | 4 ++-- .../static/controllers/reflec/scores.react.js | 2 +- .../static/controllers/sdvx/rivals.react.js | 2 +- .../static/controllers/sdvx/scores.react.js | 2 +- bemani/frontend/static/loading-16.gif | Bin 21908 -> 0 bytes bemani/frontend/static/loading-20.gif | Bin 22489 -> 0 bytes bemani/frontend/static/themes/dark/form.css | 18 +++++++++--------- .../static/themes/dark/loading-16.gif | Bin 0 -> 2741 bytes .../static/themes/dark/loading-24.gif | Bin 0 -> 4078 bytes bemani/frontend/static/themes/dark/site.css | 16 ++++++++-------- bemani/frontend/static/themes/dark/table.css | 6 +++--- .../static/themes/default/loading-16.gif | Bin 0 -> 2741 bytes .../static/themes/default/loading-24.gif | Bin 0 -> 4078 bytes .../frontend/static/themes/default/site.css | 2 +- bemani/frontend/templates/base.html | 1 + bemani/frontend/templates/react.html | 2 +- 38 files changed, 59 insertions(+), 52 deletions(-) delete mode 100644 bemani/frontend/static/loading-16.gif delete mode 100644 bemani/frontend/static/loading-20.gif create mode 100755 bemani/frontend/static/themes/dark/loading-16.gif create mode 100755 bemani/frontend/static/themes/dark/loading-24.gif create mode 100755 bemani/frontend/static/themes/default/loading-16.gif create mode 100755 bemani/frontend/static/themes/default/loading-24.gif diff --git a/bemani/frontend/app.py b/bemani/frontend/app.py index 97c534a..24aed54 100644 --- a/bemani/frontend/app.py +++ b/bemani/frontend/app.py @@ -374,6 +374,7 @@ def navigation() -> Dict[str, Any]: return { "components": components, "any": jinja2_any, + "assets": f"themes/{config.theme}/", "theme_url": jinja2_theme, "cache_bust": f"v={FRONTEND_CACHE_BUST}", } @@ -384,6 +385,7 @@ def navigation() -> Dict[str, Any]: return { "components": components, "any": jinja2_any, + "assets": f"themes/{config.theme}/", "theme_url": jinja2_theme, "cache_bust": f"v={FRONTEND_CACHE_BUST}", } @@ -938,6 +940,7 @@ def navigation() -> Dict[str, Any]: "navigation": pages, "components": components, "any": jinja2_any, + "assets": f"themes/{config.theme}/", "theme_url": jinja2_theme, "cache_bust": f"v={FRONTEND_CACHE_BUST}", } diff --git a/bemani/frontend/static/components/add.react.js b/bemani/frontend/static/components/add.react.js index d69230c..48b87a7 100644 --- a/bemani/frontend/static/components/add.react.js +++ b/bemani/frontend/static/components/add.react.js @@ -5,6 +5,7 @@ var Add = createReactClass({ return (