From c1977567677385bef3f27ba0f8d20e13e07cd9e9 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Wed, 16 Dec 2020 18:25:07 +0200 Subject: [PATCH 1/4] Basic no-wallpaper support --- src/App.js | 17 ++++++++++------- src/App.scss | 4 +++- src/App.vue | 3 +-- src/components/desktop_nav/desktop_nav.scss | 4 ++++ .../settings_modal/tabs/general_tab.js | 4 ++++ .../settings_modal/tabs/general_tab.vue | 5 +++++ .../tabs/theme_tab/theme_tab.scss | 3 ++- src/i18n/en.json | 1 + src/modules/config.js | 1 + src/services/theme_data/pleromafe.js | 4 ++++ static/themes/redmond-xx-se.json | 1 + static/themes/redmond-xx.json | 1 + static/themes/redmond-xxi.json | 1 + 13 files changed, 38 insertions(+), 11 deletions(-) diff --git a/src/App.js b/src/App.js index 52700319..c79184ab 100644 --- a/src/App.js +++ b/src/App.js @@ -54,13 +54,16 @@ export default { return this.currentUser.background_image || this.$store.state.instance.background }, bgStyle () { - return { - 'background-image': `url(${this.background})` - } - }, - bgAppStyle () { - return { - '--body-background-image': `url(${this.background})` + if ( + this.currentUser.background_image || + ( + this.$store.state.instance.background && + !this.$store.getters.mergedConfig.hideInstanceWallpaper + ) + ) { + return { + '--body-background-image': `url(${this.background})` + } } }, chat () { return this.$store.state.chat.channel.state === 'joined' }, diff --git a/src/App.scss b/src/App.scss index cdc3209c..394d6434 100644 --- a/src/App.scss +++ b/src/App.scss @@ -14,7 +14,9 @@ right: -20px; background-size: cover; background-repeat: no-repeat; - background-position: 0 50%; + background-color: var(--wallpaper); + background-image: var(--body-background-image); + background-position: 50% 50px; } i[class^='icon-'] { diff --git a/src/App.vue b/src/App.vue index b4eb0524..1a166778 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,12 +1,11 @@