Add option to enable (experimental) playlists in UI
This commit is contained in:
@@ -36,6 +36,7 @@ type nd struct {
|
|||||||
// DevFlags. These are used to enable/disable debugging and incomplete features
|
// DevFlags. These are used to enable/disable debugging and incomplete features
|
||||||
DevLogSourceLine bool `default:"false"`
|
DevLogSourceLine bool `default:"false"`
|
||||||
DevAutoCreateAdminPassword string `default:""`
|
DevAutoCreateAdminPassword string `default:""`
|
||||||
|
DevEnableUIPlaylists bool `default:"false"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var Server = &nd{}
|
var Server = &nd{}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ func ServeIndex(ds model.DataStore, fs http.FileSystem) http.HandlerFunc {
|
|||||||
"baseURL": strings.TrimSuffix(conf.Server.BaseURL, "/"),
|
"baseURL": strings.TrimSuffix(conf.Server.BaseURL, "/"),
|
||||||
"loginBackgroundURL": conf.Server.UILoginBackgroundURL,
|
"loginBackgroundURL": conf.Server.UILoginBackgroundURL,
|
||||||
"enableTranscodingConfig": conf.Server.EnableTranscodingConfig,
|
"enableTranscodingConfig": conf.Server.EnableTranscodingConfig,
|
||||||
|
"enablePlaylists": conf.Server.DevEnableUIPlaylists,
|
||||||
}
|
}
|
||||||
j, err := json.Marshal(appConfig)
|
j, err := json.Marshal(appConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
+8
-5
@@ -14,6 +14,7 @@ import artist from './artist'
|
|||||||
import playlist from './playlist'
|
import playlist from './playlist'
|
||||||
import { Player, playQueueReducer } from './audioplayer'
|
import { Player, playQueueReducer } from './audioplayer'
|
||||||
import { albumViewReducer } from './album/albumState'
|
import { albumViewReducer } from './album/albumState'
|
||||||
|
import config from './config'
|
||||||
import customRoutes from './routes'
|
import customRoutes from './routes'
|
||||||
import themeReducer from './personal/themeReducer'
|
import themeReducer from './personal/themeReducer'
|
||||||
import createAdminStore from './store/createAdminStore'
|
import createAdminStore from './store/createAdminStore'
|
||||||
@@ -47,11 +48,13 @@ const App = () => (
|
|||||||
<Resource name="album" {...album} options={{ subMenu: 'library' }} />,
|
<Resource name="album" {...album} options={{ subMenu: 'library' }} />,
|
||||||
<Resource name="artist" {...artist} options={{ subMenu: 'library' }} />,
|
<Resource name="artist" {...artist} options={{ subMenu: 'library' }} />,
|
||||||
<Resource name="song" {...song} options={{ subMenu: 'library' }} />,
|
<Resource name="song" {...song} options={{ subMenu: 'library' }} />,
|
||||||
<Resource
|
config.enablePlaylists && (
|
||||||
name="playlist"
|
<Resource
|
||||||
{...playlist}
|
name="playlist"
|
||||||
options={{ subMenu: 'library' }}
|
{...playlist}
|
||||||
/>,
|
options={{ subMenu: 'library' }}
|
||||||
|
/>
|
||||||
|
),
|
||||||
permissions === 'admin' ? (
|
permissions === 'admin' ? (
|
||||||
<Resource name="user" {...user} options={{ subMenu: 'settings' }} />
|
<Resource name="user" {...user} options={{ subMenu: 'settings' }} />
|
||||||
) : null,
|
) : null,
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ const defaultConfig = {
|
|||||||
baseURL: '',
|
baseURL: '',
|
||||||
loginBackgroundURL: 'https://source.unsplash.com/random/1600x900?music',
|
loginBackgroundURL: 'https://source.unsplash.com/random/1600x900?music',
|
||||||
enableTranscodingConfig: true,
|
enableTranscodingConfig: true,
|
||||||
|
enablePlaylists: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
let config
|
let config
|
||||||
|
|||||||
Reference in New Issue
Block a user