diff --git a/src/App.js b/src/App.js index c326ddfc92..736755ea87 100644 --- a/src/App.js +++ b/src/App.js @@ -16,7 +16,10 @@ export default { }), computed: { currentUser () { return this.$store.state.users.currentUser }, - style () { return { 'background-image': `url(${this.currentUser.background_image})` } }, + background () { + return this.currentUser.background_image || this.$store.state.config.background + }, + style () { return { 'background-image': `url(${this.background})` } }, sitename () { return this.$store.state.config.name } }, methods: { diff --git a/src/main.js b/src/main.js index 20489d42f2..68653c37b0 100644 --- a/src/main.js +++ b/src/main.js @@ -71,7 +71,8 @@ new Vue({ window.fetch('/static/config.json') .then((res) => res.json()) - .then(({name, theme}) => { + .then(({name, theme, background}) => { store.dispatch('setOption', { name: 'name', value: name }) store.dispatch('setOption', { name: 'theme', value: theme }) + store.dispatch('setOption', { name: 'background', value: background }) }) diff --git a/static/bg.jpg b/static/bg.jpg new file mode 100644 index 0000000000..60e2311a21 Binary files /dev/null and b/static/bg.jpg differ diff --git a/static/bgalt.jpg b/static/bgalt.jpg new file mode 100644 index 0000000000..fdb666ff0b Binary files /dev/null and b/static/bgalt.jpg differ diff --git a/static/config.json b/static/config.json index 058c9875b6..d522e7e233 100644 --- a/static/config.json +++ b/static/config.json @@ -1,4 +1,5 @@ { "name": "Pleroma FE", - "theme": "base16-ashes.css" + "theme": "base16-ashes.css", + "background": "/static/bg.jpg" }