quintodrome/ui/src/config.js
Deluan f33ca75378 refactor: rename EnableCoverArtUpload to EnableArtworkUpload
The config flag gates all image uploads (artists, radios, playlists),
not just cover art. Rename it to accurately reflect its scope across
the backend config, native API permission check, Subsonic CoverArtRole,
serve_index JSON key, and frontend config.
2026-03-27 19:33:46 -04:00

66 lines
1.7 KiB
JavaScript

// 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
const defaultConfig = {
version: 'dev',
firstTime: false,
baseURL: '',
variousArtistsId: '63sqASlAfjbGMuLP4JhnZU', // See consts.VariousArtistsID in consts.go
// Login backgrounds from https://unsplash.com/collections/1065384/music-wallpapers
loginBackgroundURL: 'https://source.unsplash.com/collection/1065384/1600x900',
maxSidebarPlaylists: 100,
enableTranscodingConfig: true,
enableDownloads: true,
enableFavourites: true,
losslessFormats: 'FLAC,WAV,ALAC,DSF',
welcomeMessage: '',
gaTrackingId: '',
devActivityPanel: true,
enableStarRating: true,
defaultTheme: 'Dark',
defaultLanguage: '',
defaultUIVolume: 100,
uiSearchDebounceMs: 200,
enableUserEditing: true,
enableArtworkUpload: true,
enableSharing: true,
shareURL: '',
defaultDownloadableShare: true,
devSidebarPlaylists: true,
lastFMEnabled: true,
listenBrainzEnabled: true,
enableExternalServices: true,
enableCoverAnimation: true,
enableNowPlaying: true,
devShowArtistPage: true,
devUIShowConfig: true,
devNewEventStream: false,
enableReplayGain: true,
defaultDownsamplingFormat: 'opus',
publicBaseUrl: '/share',
separator: '/',
enableInspect: true,
pluginsEnabled: true,
}
let config
try {
const appConfig = JSON.parse(window.__APP_CONFIG__)
config = {
...defaultConfig,
...appConfig,
}
} catch (e) {
config = defaultConfig
}
export let shareInfo
try {
shareInfo = JSON.parse(window.__SHARE_INFO__)
} catch (e) {
shareInfo = null
}
export default config