mirror of
https://github.com/nextcloud/server.git
synced 2026-06-06 23:34:22 -04:00
Merge pull request #33299 from nextcloud/fix/files-dark-color-theme
[files app]: Fix dark color mode detection for filelist
This commit is contained in:
commit
d2d408bba7
1 changed files with 5 additions and 2 deletions
|
|
@ -1792,8 +1792,11 @@
|
|||
td.append(linkElem);
|
||||
tr.append(td);
|
||||
|
||||
var enabledThemes = window.OCA?.Theming?.enabledThemes || []
|
||||
var isDarkTheme = enabledThemes.join('').indexOf('dark') !== -1
|
||||
const enabledThemes = window.OCA?.Theming?.enabledThemes || []
|
||||
// Check enabled themes, if system default is selected check the browser
|
||||
const isDarkTheme = (enabledThemes.length === 0 || enabledThemes[0] === 'default')
|
||||
? window.matchMedia('(prefers-color-scheme: dark)').matches
|
||||
: enabledThemes.join('').indexOf('dark') !== -1
|
||||
|
||||
try {
|
||||
var maxContrastHex = window.getComputedStyle(document.documentElement)
|
||||
|
|
|
|||
Loading…
Reference in a new issue