summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-07-25 17:07:22 +0200
committerGitHub <noreply@github.com>2019-07-25 17:07:22 +0200
commite51c269dbeddc3d9fa409801260b7265b50d658f (patch)
tree41bba7326f512cf4a248f2f634d839f253ef1ca4 /apps/files
parentc504ed66b7fd8133b634e596a7919f27baa1d7a2 (diff)
parent003e23520d12840a5806a46275db9c9499b5c17c (diff)
downloadnextcloud-server-e51c269dbeddc3d9fa409801260b7265b50d658f.tar.gz
nextcloud-server-e51c269dbeddc3d9fa409801260b7265b50d658f.zip
Merge pull request #16532 from nextcloud/bugfix/14776/maxcontrast-fix
Fix max contrast retrieval to limit minimum color for relative time
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/js/filelist.js9
1 files changed, 6 insertions, 3 deletions
diff --git a/apps/files/js/filelist.js b/apps/files/js/filelist.js
index bfaee261b11..7a6665b0807 100644
--- a/apps/files/js/filelist.js
+++ b/apps/files/js/filelist.js
@@ -1540,13 +1540,16 @@
try {
var maxContrastHex = window.getComputedStyle(document.documentElement)
- .getPropertyValue('--color-text-maxcontrast')
+ .getPropertyValue('--color-text-maxcontrast').trim()
+ if (maxContrastHex.length < 4) {
+ throw Error();
+ }
var maxContrast = parseInt(maxContrastHex.substring(1, 3), 16)
} catch(error) {
var maxContrast = OCA.Accessibility
&& OCA.Accessibility.theme === 'themedark'
- ? '130'
- : '118'
+ ? 130
+ : 118
}
// size column