From 04ee1e73bee8df22fbe098ddd4cf922b2215f2e5 Mon Sep 17 00:00:00 2001 From: neo773 <62795688+neo773@users.noreply.github.com> Date: Sat, 19 Apr 2025 00:26:44 +0530 Subject: [PATCH] Fix dark mode support and improve notification/MFA UI (#2126) * Fix dark mode support and improve notification/MFA UI" * hide auth tabs on mfa/verify --- .../controllers/theme_controller.js | 3 +-- app/views/layouts/auth.html.erb | 20 ++++++++++--------- app/views/layouts/shared/_htmldoc.html.erb | 2 +- app/views/mfa/verify.html.erb | 3 ++- .../shared/notifications/_alert.html.erb | 4 ++-- app/views/shared/notifications/_cta.html.erb | 4 ++-- .../shared/notifications/_loading.html.erb | 4 ++-- .../shared/notifications/_notice.html.erb | 4 ++-- 8 files changed, 23 insertions(+), 21 deletions(-) diff --git a/app/javascript/controllers/theme_controller.js b/app/javascript/controllers/theme_controller.js index 47815efc..d01edf7f 100644 --- a/app/javascript/controllers/theme_controller.js +++ b/app/javascript/controllers/theme_controller.js @@ -50,8 +50,7 @@ export default class extends Controller { } systemPrefersDark() { - return false - // return window.matchMedia("(prefers-color-scheme: dark)").matches + return window.matchMedia("(prefers-color-scheme: dark)").matches } handleSystemThemeChange = (event) => { diff --git a/app/views/layouts/auth.html.erb b/app/views/layouts/auth.html.erb index 1b3c4731..85adc63a 100644 --- a/app/views/layouts/auth.html.erb +++ b/app/views/layouts/auth.html.erb @@ -10,18 +10,20 @@