Initial work on Shares
This commit is contained in:
+14
-6
@@ -15,6 +15,7 @@ import album from './album'
|
||||
import artist from './artist'
|
||||
import playlist from './playlist'
|
||||
import radio from './radio'
|
||||
import share from './share'
|
||||
import { Player } from './audioplayer'
|
||||
import customRoutes from './routes'
|
||||
import {
|
||||
@@ -31,10 +32,11 @@ import {
|
||||
} from './reducers'
|
||||
import createAdminStore from './store/createAdminStore'
|
||||
import { i18nProvider } from './i18n'
|
||||
import config from './config'
|
||||
import config, { shareInfo } from './config'
|
||||
import { setDispatch, startEventStream, stopEventStream } from './eventStream'
|
||||
import { keyMap } from './hotkeys'
|
||||
import useChangeThemeColor from './useChangeThemeColor'
|
||||
import ShareApp from './ShareApp'
|
||||
|
||||
const history = createHashHistory()
|
||||
|
||||
@@ -106,6 +108,7 @@ const Admin = (props) => {
|
||||
name="radio"
|
||||
{...(permissions === 'admin' ? radio.admin : radio.all)}
|
||||
/>,
|
||||
config.devEnableShare && <Resource name="share" {...share} />,
|
||||
<Resource
|
||||
name="playlist"
|
||||
{...playlist}
|
||||
@@ -136,10 +139,15 @@ const Admin = (props) => {
|
||||
)
|
||||
}
|
||||
|
||||
const AppWithHotkeys = () => (
|
||||
<HotKeys keyMap={keyMap}>
|
||||
<App />
|
||||
</HotKeys>
|
||||
)
|
||||
const AppWithHotkeys = () => {
|
||||
if (config.devEnableShare && shareInfo) {
|
||||
return <ShareApp />
|
||||
}
|
||||
return (
|
||||
<HotKeys keyMap={keyMap}>
|
||||
<App />
|
||||
</HotKeys>
|
||||
)
|
||||
}
|
||||
|
||||
export default AppWithHotkeys
|
||||
|
||||
Reference in New Issue
Block a user