AG-21485 - Login theme bugfix.

Squashed commit of the following:

commit 521aedc5bc
Merge: 40ff26ea2 1842f7d88
Author: Artem Krisanov <a.krisanov@adguard.com>
Date:   Tue Apr 18 14:27:28 2023 +0300

    Merge branch 'master' of ssh://bit.adguard.com:7999/dns/adguard-home into AG-21485

commit 40ff26ea21
Author: Artem Krisanov <a.krisanov@adguard.com>
Date:   Tue Apr 18 14:11:28 2023 +0300

    Login theme bugfix.
This commit is contained in:
Artem Krisanov 2023-04-18 14:31:20 +03:00
parent 1842f7d888
commit 76a74b271b

View File

@ -19,7 +19,9 @@
<div id="root"></div>
<script>
(function() {
document.body.dataset.theme = 'auto';
var prefersDark = window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches;
var currentTheme = prefersDark ? 'dark' : 'light';
document.body.dataset.theme = currentTheme;
})();
</script>
</body>