Update from upstream (2025-03-04)

This commit is contained in:
Ferdinand Linnenberg 2025-03-04 17:34:32 +01:00
parent 793c97b343
commit 5a0e1b3d51
No known key found for this signature in database
GPG key ID: 0684E36E6CF9D4D4
59 changed files with 12717 additions and 3344 deletions

8
src/web/waiters/OptionsWaiter.mjs Executable file → Normal file
View file

@ -163,6 +163,14 @@ class OptionsWaiter {
themeSelect.selectedIndex = themeSelect.querySelector(`option[value="${theme}"`).index;
}
/**
* Applies the user's preferred color scheme using the `prefers-color-scheme` media query.
*/
applyPreferredColorScheme() {
const prefersDarkScheme = window.matchMedia("(prefers-color-scheme: dark)").matches;
const theme = prefersDarkScheme ? "dark" : "classic";
this.changeTheme(theme);
}
/**
* Changes the console logging level.