aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dashboard
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2022-04-20 10:40:09 +0200
committerJohn Molakvoæ <skjnldsv@protonmail.com>2022-04-21 19:00:28 +0200
commit1dee36c761b87ab79bb54cfc561d576d8c72434c (patch)
treef16175b4983c69b0796fafb71d6ccc343cf8bbd7 /apps/dashboard
parent7b686abe7fb53c8475d8295a59167bdab95fccc9 (diff)
downloadnextcloud-server-1dee36c761b87ab79bb54cfc561d576d8c72434c.tar.gz
nextcloud-server-1dee36c761b87ab79bb54cfc561d576d8c72434c.zip
Remove accessibility
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/dashboard')
-rw-r--r--apps/dashboard/src/helpers/getBackgroundUrl.js8
1 files changed, 7 insertions, 1 deletions
diff --git a/apps/dashboard/src/helpers/getBackgroundUrl.js b/apps/dashboard/src/helpers/getBackgroundUrl.js
index f9d6129700f..194e5e59885 100644
--- a/apps/dashboard/src/helpers/getBackgroundUrl.js
+++ b/apps/dashboard/src/helpers/getBackgroundUrl.js
@@ -26,16 +26,22 @@ import { generateUrl } from '@nextcloud/router'
import prefixWithBaseUrl from './prefixWithBaseUrl'
export default (background, time = 0, themingDefaultBackground = '') => {
+ const enabledThemes = window.OCA.Theming.enabledThemes
+ const isDarkTheme = enabledThemes.join('').indexOf('dark') !== -1
+
if (background === 'default') {
if (themingDefaultBackground && themingDefaultBackground !== 'backgroundColor') {
return generateUrl('/apps/theming/image/background') + '?v=' + window.OCA.Theming.cacheBuster
}
- if (window.OCA.Accessibility && window.OCA.Accessibility.theme === 'dark') {
+
+ if (isDarkTheme) {
return prefixWithBaseUrl('eduardo-neves-pedra-azul.jpg')
}
+
return prefixWithBaseUrl('kamil-porembinski-clouds.jpg')
} else if (background === 'custom') {
return generateUrl('/apps/dashboard/background') + '?v=' + time
}
+
return prefixWithBaseUrl(background)
}