Add flag to enable activity menu
This commit is contained in:
parent
56803d0151
commit
a2e76d6898
|
@ -51,6 +51,7 @@ type configOptions struct {
|
||||||
DevPreCacheAlbumArtwork bool
|
DevPreCacheAlbumArtwork bool
|
||||||
DevDisableTrackCoverArt bool
|
DevDisableTrackCoverArt bool
|
||||||
DevOldCacheLayout bool
|
DevOldCacheLayout bool
|
||||||
|
DevActivityMenu bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type scannerOptions struct {
|
type scannerOptions struct {
|
||||||
|
@ -138,6 +139,7 @@ func init() {
|
||||||
viper.SetDefault("devprecachealbumartwork", false)
|
viper.SetDefault("devprecachealbumartwork", false)
|
||||||
viper.SetDefault("devoldcachelayout", false)
|
viper.SetDefault("devoldcachelayout", false)
|
||||||
viper.SetDefault("devdisabletrackcoverart", false)
|
viper.SetDefault("devdisabletrackcoverart", false)
|
||||||
|
viper.SetDefault("devactivitymenu", false)
|
||||||
}
|
}
|
||||||
|
|
||||||
func InitConfig(cfgFile string) {
|
func InitConfig(cfgFile string) {
|
||||||
|
|
|
@ -34,6 +34,7 @@ func serveIndex(ds model.DataStore, fs http.FileSystem) http.HandlerFunc {
|
||||||
"welcomeMessage": policy.Sanitize(conf.Server.UIWelcomeMessage),
|
"welcomeMessage": policy.Sanitize(conf.Server.UIWelcomeMessage),
|
||||||
"enableTranscodingConfig": conf.Server.EnableTranscodingConfig,
|
"enableTranscodingConfig": conf.Server.EnableTranscodingConfig,
|
||||||
"gaTrackingId": conf.Server.GATrackingID,
|
"gaTrackingId": conf.Server.GATrackingID,
|
||||||
|
"devActivityMenu": conf.Server.DevActivityMenu,
|
||||||
}
|
}
|
||||||
j, err := json.Marshal(appConfig)
|
j, err := json.Marshal(appConfig)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -59,7 +59,9 @@ const App = () => (
|
||||||
|
|
||||||
const Admin = (props) => {
|
const Admin = (props) => {
|
||||||
const dispatch = useDispatch()
|
const dispatch = useDispatch()
|
||||||
startEventStream((data) => dispatch(processEvent(data)))
|
if (config.devActivityMenu) {
|
||||||
|
startEventStream((data) => dispatch(processEvent(data)))
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<RAAdmin
|
<RAAdmin
|
||||||
|
|
|
@ -9,6 +9,7 @@ const defaultConfig = {
|
||||||
enableTranscodingConfig: true,
|
enableTranscodingConfig: true,
|
||||||
welcomeMessage: '',
|
welcomeMessage: '',
|
||||||
gaTrackingId: '',
|
gaTrackingId: '',
|
||||||
|
devActivityMenu: true,
|
||||||
}
|
}
|
||||||
|
|
||||||
let config
|
let config
|
||||||
|
|
|
@ -13,6 +13,7 @@ import InfoIcon from '@material-ui/icons/Info'
|
||||||
import AboutDialog from './AboutDialog'
|
import AboutDialog from './AboutDialog'
|
||||||
import PersonalMenu from './PersonalMenu'
|
import PersonalMenu from './PersonalMenu'
|
||||||
import ActivityMenu from './ActivityMenu'
|
import ActivityMenu from './ActivityMenu'
|
||||||
|
import config from '../config'
|
||||||
|
|
||||||
const useStyles = makeStyles((theme) => ({
|
const useStyles = makeStyles((theme) => ({
|
||||||
root: {
|
root: {
|
||||||
|
@ -87,7 +88,7 @@ const CustomUserMenu = ({ onClick, ...rest }) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<ActivityMenu />
|
{config.devActivityMenu && <ActivityMenu />}
|
||||||
<UserMenu {...rest}>
|
<UserMenu {...rest}>
|
||||||
<PersonalMenu sidebarIsOpen={true} onClick={onClick} />
|
<PersonalMenu sidebarIsOpen={true} onClick={onClick} />
|
||||||
<hr />
|
<hr />
|
||||||
|
|
Loading…
Reference in New Issue