summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2020-08-14 17:21:35 +0200
committerJulius Härtl <jus@bitgrid.net>2020-08-19 17:07:27 +0200
commit8d22d02422c80aeb98ee56a254b7444e609b89d7 (patch)
treeec8aa051486112b66ebce0d8deef093c369443d8
parent9a90351435948cde9cc688ee099c28ecba29ebd5 (diff)
downloadnextcloud-server-8d22d02422c80aeb98ee56a254b7444e609b89d7.tar.gz
nextcloud-server-8d22d02422c80aeb98ee56a254b7444e609b89d7.zip
Remove old shipped background
Signed-off-by: Julius Härtl <jus@bitgrid.net>
-rw-r--r--apps/dashboard/lib/Service/BackgroundService.php2
-rw-r--r--apps/dashboard/src/App.vue23
-rw-r--r--apps/dashboard/src/components/BackgroundSettings.vue5
3 files changed, 16 insertions, 14 deletions
diff --git a/apps/dashboard/lib/Service/BackgroundService.php b/apps/dashboard/lib/Service/BackgroundService.php
index e8676a76e89..a651d11618f 100644
--- a/apps/dashboard/lib/Service/BackgroundService.php
+++ b/apps/dashboard/lib/Service/BackgroundService.php
@@ -37,8 +37,6 @@ use OCP\IConfig;
class BackgroundService {
const SHIPPED_BACKGROUNDS = [
- 'flickr-148302424@N05-36591009215.jpg',
- 'flickr-paszczak000-8715851521.jpg',
'anatoly-mikhaltsov-butterfly-wing-scale.jpg',
'bernie-cetonia-aurata-take-off-composition.jpg',
'dejan-krsmanovic-ribbed-red-metal.jpg',
diff --git a/apps/dashboard/src/App.vue b/apps/dashboard/src/App.vue
index 33f820ecd7a..c4a41f5dac4 100644
--- a/apps/dashboard/src/App.vue
+++ b/apps/dashboard/src/App.vue
@@ -80,6 +80,19 @@ const background = loadState('dashboard', 'background')
const prefixWithBaseUrl = (url) => generateFilePath('dashboard', '', 'img/') + url
+// FIXME: move out duplicate
+const getBackgroundUrl = (background, time = 0) => {
+ if (background === 'default') {
+ if (window.OCA.Accessibility.theme === 'dark') {
+ 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)
+}
+
export default {
name: 'App',
components: {
@@ -111,15 +124,7 @@ export default {
},
computed: {
backgroundImage() {
- if (this.background === 'default') {
- if (window.OCA.Accessibility.theme === 'dark') {
- return !isMobile ? prefixWithBaseUrl('flickr-148302424@N05-36591009215.jpg?v=1') : prefixWithBaseUrl('flickr-148302424@N05-36591009215-mobile.jpg?v=1')
- }
- return !isMobile ? prefixWithBaseUrl('flickr-paszczak000-8715851521.jpg?v=1') : prefixWithBaseUrl('flickr-paszczak000-8715851521-mobile.jpg?v=1')
- } else if (this.background === 'custom') {
- return generateUrl('/apps/dashboard/background') + '?v=' + this.backgroundTime
- }
- return prefixWithBaseUrl(this.background)
+ return getBackgroundUrl(this.background, this.backgroundTime)
},
tooltip() {
if (!this.firstRun) {
diff --git a/apps/dashboard/src/components/BackgroundSettings.vue b/apps/dashboard/src/components/BackgroundSettings.vue
index ad7898f8abe..b704d4b0724 100644
--- a/apps/dashboard/src/components/BackgroundSettings.vue
+++ b/apps/dashboard/src/components/BackgroundSettings.vue
@@ -48,7 +48,6 @@
import axios from '@nextcloud/axios'
import { generateUrl, generateFilePath } from '@nextcloud/router'
import { loadState } from '@nextcloud/initial-state'
-import isMobile from '../mixins/isMobile'
const prefixWithBaseUrl = (url) => generateFilePath('dashboard', '', 'img/') + url
const shippedBackgroundList = loadState('dashboard', 'shippedBackgrounds')
@@ -56,9 +55,9 @@ const shippedBackgroundList = loadState('dashboard', 'shippedBackgrounds')
const getBackgroundUrl = (background, time = 0) => {
if (background === 'default') {
if (window.OCA.Accessibility.theme === 'dark') {
- return !isMobile ? prefixWithBaseUrl('flickr-148302424@N05-36591009215.jpg?v=1') : prefixWithBaseUrl('flickr-148302424@N05-36591009215-mobile.jpg?v=1')
+ return prefixWithBaseUrl('eduardo-neves-pedra-azul.jpg')
}
- return !isMobile ? prefixWithBaseUrl('flickr-paszczak000-8715851521.jpg?v=1') : prefixWithBaseUrl('flickr-paszczak000-8715851521-mobile.jpg?v=1')
+ return prefixWithBaseUrl('kamil-porembinski-clouds.jpg')
} else if (background === 'custom') {
return generateUrl('/apps/dashboard/background') + '?v=' + time
}