Merge branch 'dev-qol' into 'develop'

Several fixes to make life of contributors a tiny bit easier.

See merge request pleroma/pleroma-fe!409
This commit is contained in:
Shpuld Shpludson 2018-12-13 14:42:58 +00:00
commit dbe79a3c26
8 changed files with 58 additions and 9 deletions

View file

@ -42,8 +42,17 @@ const afterStoreSetup = ({ store, i18n }) => {
return {}
})
.then((staticConfig) => {
const overrides = window.___pleromafe_dev_overrides || {}
const env = window.___pleromafe_mode.NODE_ENV
// This takes static config and overrides properties that are present in apiConfig
var config = Object.assign({}, staticConfig, apiConfig)
let config = {}
if (overrides.staticConfigPreference && env === 'development') {
console.warn('OVERRIDING API CONFIG WITH STATIC CONFIG')
config = Object.assign({}, apiConfig, staticConfig)
} else {
config = Object.assign({}, staticConfig, apiConfig)
}
var theme = (config.theme)
var background = (config.background)