navidrome/ui/src/config.js
Deluan 089a92157f Pass version to UI through AppConfig, instead of login payload.master
This makes the version info updated with a browser refresh (no need to logout and login again)
2020-04-08 11:00:30 -04:00

22 lines
347 B
JavaScript

const defaultConfig = {
version: 'dev',
firstTime: false,
baseURL: '',
loginBackgroundURL: 'https://source.unsplash.com/random/1600x900?music'
}
let config
try {
const appConfig = JSON.parse(window.__APP_CONFIG__)
config = {
...defaultConfig,
...appConfig
}
} catch (e) {
config = defaultConfig
}
export default config