diff options
author | Roeland Jago Douma <rullzer@users.noreply.github.com> | 2020-01-24 13:10:56 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-24 13:10:56 +0100 |
commit | 2168e0ad89c0cb6436b5a7bf1949e938a96249be (patch) | |
tree | 46a59078234a6fc54f629b397059ea8e166834a8 /apps | |
parent | 76229bd2e71450d02c10a85b88add7eb0a6fc8f0 (diff) | |
parent | bfaf28452bf53c497b131f01181837dd32734243 (diff) | |
download | nextcloud-server-2168e0ad89c0cb6436b5a7bf1949e938a96249be.tar.gz nextcloud-server-2168e0ad89c0cb6436b5a7bf1949e938a96249be.zip |
Merge pull request #19109 from nextcloud/bugfix/18528/dark-theme-last-modified
Adjust filelist color handling to new dark theme value
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/js/filelist.js | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js index 821a11804b4..274c2f231f3 100644 --- a/apps/files/js/filelist.js +++ b/apps/files/js/filelist.js @@ -1591,6 +1591,8 @@ td.append(linkElem); tr.append(td); + var isDarkTheme = OCA.Accessibility && OCA.Accessibility.theme === 'dark' + try { var maxContrastHex = window.getComputedStyle(document.documentElement) .getPropertyValue('--color-text-maxcontrast').trim() @@ -1599,10 +1601,7 @@ } var maxContrast = parseInt(maxContrastHex.substring(1, 3), 16) } catch(error) { - var maxContrast = OCA.Accessibility - && OCA.Accessibility.theme === 'themedark' - ? 130 - : 118 + var maxContrast = isDarkTheme ? 130 : 118 } // size column @@ -1618,7 +1617,7 @@ sizeColor = maxContrast; } - if (OCA.Accessibility && OCA.Accessibility.theme === 'themedark') { + if (isDarkTheme) { sizeColor = Math.abs(sizeColor); // ensure that the dimmest color is still readable // min. color contrast for normal text on black background according to WCAG AA @@ -1646,7 +1645,7 @@ modifiedColor = maxContrast; } - if (OCA.Accessibility && OCA.Accessibility.theme === 'themedark') { + if (isDarkTheme) { modifiedColor = Math.abs(modifiedColor); // ensure that the dimmest color is still readable |