2020-04-27 17:23:15 -08:00
|
|
|
// These defaults are only used in development mode. When bundled in the app,
|
|
|
|
|
// the __APP_CONFIG__ object is dynamically filled by the ServeIndex function,
|
|
|
|
|
// in the /server/app/serve_index.go
|
2020-04-07 12:58:02 -08:00
|
|
|
const defaultConfig = {
|
2020-04-08 07:00:30 -08:00
|
|
|
version: 'dev',
|
2020-04-07 12:58:02 -08:00
|
|
|
firstTime: false,
|
|
|
|
|
baseURL: '',
|
2020-04-26 10:50:44 -08:00
|
|
|
loginBackgroundURL: 'https://source.unsplash.com/random/1600x900?music',
|
2020-04-27 17:23:15 -08:00
|
|
|
enableTranscodingConfig: true,
|
2020-04-07 12:58:02 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let config
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
const appConfig = JSON.parse(window.__APP_CONFIG__)
|
|
|
|
|
|
|
|
|
|
config = {
|
|
|
|
|
...defaultConfig,
|
2020-04-26 10:50:44 -08:00
|
|
|
...appConfig,
|
2020-04-07 12:58:02 -08:00
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
config = defaultConfig
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default config
|