diff options
| author | Henry Jameson <me@hjkos.com> | 2018-09-17 18:54:08 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2018-09-17 18:54:08 +0300 |
| commit | 9467462ef0c3ed450332a1e2335dce52b7d578f1 (patch) | |
| tree | c0ce6223cc4e59b2bb4d5b0f498e916915994fe4 /src/modules/instance.js | |
| parent | 40a175389a90dbbc7fc46e2ec532e7e21576f2ff (diff) | |
made FE work even without either api or static config
Diffstat (limited to 'src/modules/instance.js')
| -rw-r--r-- | src/modules/instance.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/modules/instance.js b/src/modules/instance.js index a4fc9651..cb724821 100644 --- a/src/modules/instance.js +++ b/src/modules/instance.js @@ -1,4 +1,5 @@ import { set } from 'vue' +import StyleSetter from '../services/style_setter/style_setter.js' const defaultState = { // Stuff from static/config.json and apiConfig @@ -7,7 +8,7 @@ const defaultState = { textlimit: 5000, server: 'http://localhost:4040/', theme: 'pleroma-dark', - background: 'img.png', + background: '/static/aurora_borealis.jpg', logo: '/static/logo.png', logoMask: true, logoMargin: '.2em', @@ -40,7 +41,9 @@ const instance = { state: defaultState, mutations: { setInstanceOption (state, { name, value }) { - set(state, name, value) + if (typeof value !== 'undefined') { + set(state, name, value) + } } }, actions: { @@ -50,6 +53,8 @@ const instance = { case 'name': dispatch('setPageTitle') break + case 'theme': + StyleSetter.setPreset(value, commit) } } } |
