aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dashboard/src/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dashboard/src/helpers')
-rw-r--r--apps/dashboard/src/helpers/getBackgroundUrl.js6
-rw-r--r--apps/dashboard/src/helpers/prefixWithBaseUrl.js2
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/dashboard/src/helpers/getBackgroundUrl.js b/apps/dashboard/src/helpers/getBackgroundUrl.js
index 4876fa77e86..88a3ab57291 100644
--- a/apps/dashboard/src/helpers/getBackgroundUrl.js
+++ b/apps/dashboard/src/helpers/getBackgroundUrl.js
@@ -23,9 +23,9 @@
*/
import { generateUrl } from '@nextcloud/router'
-import prefixWithBaseUrl from './prefixWithBaseUrl'
+import { prefixWithBaseUrl } from './prefixWithBaseUrl.js'
-export default (background, time = 0, themingDefaultBackground = '') => {
+export const getBackgroundUrl = (background, time = 0, themingDefaultBackground = '') => {
const enabledThemes = window.OCA?.Theming?.enabledThemes || []
const isDarkTheme = (enabledThemes.length === 0 || enabledThemes[0] === 'default')
? window.matchMedia('(prefers-color-scheme: dark)').matches
@@ -42,7 +42,7 @@ export default (background, time = 0, themingDefaultBackground = '') => {
return prefixWithBaseUrl('kamil-porembinski-clouds.jpg')
} else if (background === 'custom') {
- return generateUrl('/apps/dashboard/background') + '?v=' + time
+ return generateUrl('/apps/theming/background') + '?v=' + time
}
return prefixWithBaseUrl(background)
diff --git a/apps/dashboard/src/helpers/prefixWithBaseUrl.js b/apps/dashboard/src/helpers/prefixWithBaseUrl.js
index cd0cc6a9464..d2f42c93549 100644
--- a/apps/dashboard/src/helpers/prefixWithBaseUrl.js
+++ b/apps/dashboard/src/helpers/prefixWithBaseUrl.js
@@ -22,4 +22,4 @@
import { generateFilePath } from '@nextcloud/router'
-export default (url) => generateFilePath('dashboard', '', 'img/') + url
+export const prefixWithBaseUrl = (url) => generateFilePath('theming', '', 'img/background/') + url