summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2020-01-26 20:37:45 +0100
committerGitHub <noreply@github.com>2020-01-26 20:37:45 +0100
commit4f087d7af6962a1486b890a1e7c43d55b4a06eb5 (patch)
treee0f6d56aed495004aa99b2b9da7a03366a3fa589 /apps
parent81e787822aef852b9ebc078f32f82173ba5bfab5 (diff)
parent77797b4910749de1c107c39a26721df52c49b4ae (diff)
downloadnextcloud-server-4f087d7af6962a1486b890a1e7c43d55b4a06eb5.tar.gz
nextcloud-server-4f087d7af6962a1486b890a1e7c43d55b4a06eb5.zip
Merge pull request #19117 from nextcloud/backport/19109/stable18
[stable18] Adjust filelist color handling to new dark theme value
Diffstat (limited to 'apps')
-rw-r--r--apps/files/js/filelist.js11
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