Browse Source

Fix late night errors

Signed-off-by: Julius Härtl <jus@bitgrid.net>
tags/v20.0.0beta1
Julius Härtl 3 years ago
parent
commit
135ceb4a9d
No account linked to committer's email address

+ 1
- 1
apps/dashboard/lib/Service/BackgroundService.php View File

@@ -107,7 +107,7 @@ class BackgroundService {
}

public function setShippedBackground($fileName) {
if (!in_array($fileName, self::SHIPPED_BACKGROUNDS)) {
if (!array_key_exists($fileName, self::SHIPPED_BACKGROUNDS)) {
throw new \InvalidArgumentException('The given file name is invalid');
}
$this->config->setUserValue($this->userId, 'dashboard', 'background', $fileName);

+ 5
- 0
apps/dashboard/src/components/BackgroundSettings.vue View File

@@ -95,6 +95,11 @@ export default {
async update(data) {
const background = data.type === 'custom' || data.type === 'default' ? data.type : data.value
this.backgroundImage = getBackgroundUrl(background, data.version)
if (data.type === 'color') {
this.$emit('updateBackground', data)
this.loading = false
return
}
const image = new Image()
image.onload = () => {
this.$emit('updateBackground', data)

Loading…
Cancel
Save