aboutsummaryrefslogtreecommitdiff
path: root/src/App.js
diff options
context:
space:
mode:
authorHJ <30-hj@users.noreply.git.pleroma.social>2020-12-18 08:37:01 +0000
committerHJ <30-hj@users.noreply.git.pleroma.social>2020-12-18 08:37:01 +0000
commit8d9bf3efc8825afaf07dca4db69cb19f3dfbe411 (patch)
treeffdf4b45e8d17fe2e3c6d5ba03c69f308b18c702 /src/App.js
parent3359d4ddf6ee6449bd230eb2056f08edbb3d355e (diff)
parent93af7ee36a6956d4ec3d0ffd57ec733ddc7cd4e9 (diff)
Merge branch 'plain-bg' into 'develop'
Solid color wallpaper support See merge request pleroma/pleroma-fe!1314
Diffstat (limited to 'src/App.js')
-rw-r--r--src/App.js23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/App.js b/src/App.js
index 52700319..1ca029b6 100644
--- a/src/App.js
+++ b/src/App.js
@@ -15,6 +15,7 @@ import UserReportingModal from './components/user_reporting_modal/user_reporting
import PostStatusModal from './components/post_status_modal/post_status_modal.vue'
import GlobalNoticeList from './components/global_notice_list/global_notice_list.vue'
import { windowWidth, windowHeight } from './services/window_utils/window_utils'
+import { mapGetters } from 'vuex'
export default {
name: 'app',
@@ -50,17 +51,18 @@ export default {
},
computed: {
currentUser () { return this.$store.state.users.currentUser },
- background () {
- return this.currentUser.background_image || this.$store.state.instance.background
+ userBackground () { return this.currentUser.background_image },
+ instanceBackground () {
+ return this.mergedConfig.hideInstanceWallpaper
+ ? null
+ : this.$store.state.instance.background
},
+ background () { return this.userBackground || this.instanceBackground },
bgStyle () {
- return {
- 'background-image': `url(${this.background})`
- }
- },
- bgAppStyle () {
- return {
- '--body-background-image': `url(${this.background})`
+ if (this.background) {
+ return {
+ '--body-background-image': `url(${this.background})`
+ }
}
},
chat () { return this.$store.state.chat.channel.state === 'joined' },
@@ -77,7 +79,8 @@ export default {
return {
'order': this.$store.state.instance.sidebarRight ? 99 : 0
}
- }
+ },
+ ...mapGetters(['mergedConfig'])
},
methods: {
updateMobileState () {