diff --git a/conf/configuration.go b/conf/configuration.go index b2de92da..7a52b7c8 100644 --- a/conf/configuration.go +++ b/conf/configuration.go @@ -36,15 +36,13 @@ type nd struct { // DevFlags. These are used to enable/disable debugging and incomplete features DevLogSourceLine bool `default:"false"` DevAutoCreateAdminPassword string `default:""` - DevEnableUIPlaylists bool `default:"true"` - DevEnableUIStarred bool `default:"true"` } var Server = &nd{} // TODO refactor configuration and use something different. Maybe https://github.com/spf13/cobra -// This function loads the config just load the ConfigFile. This is very cumbersome, but doesn't -// seem there's a simpler way to do thiswith multiconfig. Time to replace this library? +// This function loads the whole config just to get the ConfigFile. This is very cumbersome, but doesn't +// seem there's a simpler way to do this with multiconfig. Time to replace this library? func configFile() string { conf := &nd{} loader := multiconfig.MultiLoader( diff --git a/server/app/serve_index.go b/server/app/serve_index.go index 7a43caf8..7a5948d1 100644 --- a/server/app/serve_index.go +++ b/server/app/serve_index.go @@ -30,8 +30,6 @@ func ServeIndex(ds model.DataStore, fs http.FileSystem) http.HandlerFunc { "baseURL": strings.TrimSuffix(conf.Server.BaseURL, "/"), "loginBackgroundURL": conf.Server.UILoginBackgroundURL, "enableTranscodingConfig": conf.Server.EnableTranscodingConfig, - "enablePlaylists": conf.Server.DevEnableUIPlaylists, - "enableStarred": conf.Server.DevEnableUIStarred, } j, err := json.Marshal(appConfig) if err != nil { diff --git a/ui/src/App.js b/ui/src/App.js index 0eb50950..52ea5a0f 100644 --- a/ui/src/App.js +++ b/ui/src/App.js @@ -14,7 +14,6 @@ import artist from './artist' import playlist from './playlist' import { Player, playQueueReducer } from './audioplayer' import { albumViewReducer } from './album/albumState' -import config from './config' import customRoutes from './routes' import themeReducer from './personal/themeReducer' import { addToPlaylistDialogReducer } from './dialogs/dialogState' @@ -50,13 +49,11 @@ const App = () => ( , , , - config.enablePlaylists && ( - - ), + , permissions === 'admin' ? ( ) : null, diff --git a/ui/src/common/SongContextMenu.js b/ui/src/common/SongContextMenu.js index 34eb83ad..4e8c5ca0 100644 --- a/ui/src/common/SongContextMenu.js +++ b/ui/src/common/SongContextMenu.js @@ -8,7 +8,6 @@ import MoreVertIcon from '@material-ui/icons/MoreVert' import StarIcon from '@material-ui/icons/Star' import StarBorderIcon from '@material-ui/icons/StarBorder' import { addTracks, setTrack } from '../audioplayer' -import config from '../config' import { openAddToPlaylist } from '../dialogs/dialogState' const useStyles = makeStyles({ @@ -100,7 +99,7 @@ const SongContextMenu = ({ return ( - {config.enableStarred && showStar && ( + {showStar && (