From 85959a3b9bef93e9b26e6b58c49145d6f67ea571 Mon Sep 17 00:00:00 2001 From: syuilo Date: Wed, 17 Apr 2019 14:30:31 +0900 Subject: [PATCH] Fix #4721 Fix #4722 --- .../views/components/settings/settings.vue | 8 ++--- .../app/desktop/views/components/ui.vue | 7 ++-- src/client/app/store.ts | 1 + src/server/api/endpoints/i/update.ts | 33 +++++++++++-------- 4 files changed, 26 insertions(+), 23 deletions(-) diff --git a/src/client/app/common/views/components/settings/settings.vue b/src/client/app/common/views/components/settings/settings.vue index 001b692551..be2d7fce85 100644 --- a/src/client/app/common/views/components/settings/settings.vue +++ b/src/client/app/common/views/components/settings/settings.vue @@ -525,15 +525,11 @@ export default Vue.extend({ this.$chooseDriveFile({ multiple: false }).then(file => { - this.$root.api('i/update', { - wallpaperId: file.id - }); + this.$store.dispatch('settings/set', { key: 'wallpaper', value: file.url }); }); }, deleteWallpaper() { - this.$root.api('i/update', { - wallpaperId: null - }); + this.$store.dispatch('settings/set', { key: 'wallpaper', value: null }); }, checkForUpdate() { this.checkingForUpdate = true; diff --git a/src/client/app/desktop/views/components/ui.vue b/src/client/app/desktop/views/components/ui.vue index fa5efbc93e..d29fbdc1a5 100644 --- a/src/client/app/desktop/views/components/ui.vue +++ b/src/client/app/desktop/views/components/ui.vue @@ -1,6 +1,6 @@