diff options
| author | Roger Braun <roger@rogerbraun.net> | 2017-02-16 16:59:06 +0100 |
|---|---|---|
| committer | Roger Braun <roger@rogerbraun.net> | 2017-02-16 16:59:06 +0100 |
| commit | a3b2be09b3acab977682cc4cc4cebc7d9229f036 (patch) | |
| tree | 7ab6b2900354e04b0ee137f40f28ca56dc61df82 /src | |
| parent | d7c9261dab6ad2cfedd4042ddd595cd3efee542d (diff) | |
Add /cyb/ background by sonyam.
Diffstat (limited to 'src')
| -rw-r--r-- | src/App.js | 5 | ||||
| -rw-r--r-- | src/main.js | 3 |
2 files changed, 6 insertions, 2 deletions
@@ -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 20489d42..68653c37 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 }) }) |
