mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-12 01:42:32 +00:00
Expand cache
This commit is contained in:
@@ -32,13 +32,16 @@
|
||||
const setTheme = theme => {
|
||||
if (theme === 'browser' && window.matchMedia('(prefers-color-scheme: dark)').matches) {
|
||||
document.documentElement.setAttribute('data-bs-theme', 'dark')
|
||||
window.theme = 'dark';
|
||||
return;
|
||||
}
|
||||
if (theme === 'browser' && window.matchMedia('(prefers-color-scheme: light)').matches) {
|
||||
window.theme = 'light';
|
||||
document.documentElement.setAttribute('data-bs-theme', 'light')
|
||||
return;
|
||||
}
|
||||
document.documentElement.setAttribute('data-bs-theme', theme)
|
||||
window.theme = theme;
|
||||
}
|
||||
|
||||
setTheme(getPreferredTheme())
|
||||
|
||||
Reference in New Issue
Block a user