Skip to content

Commit

Permalink
Add paddingBottom to the whole sidebar menu, to avoid playlists to be…
Browse files Browse the repository at this point in the history
… covered by the player
  • Loading branch information
deluan committed Sep 13, 2021
1 parent ab2912b commit b55f3a6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ui/src/layout/Menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const useStyles = makeStyles((theme) => ({
easing: theme.transitions.easing.sharp,
duration: theme.transitions.duration.leavingScreen,
}),
paddingBottom: (props) => (props.addPadding ? '80px' : '20px'),
},
open: {
width: 240,
Expand Down Expand Up @@ -49,7 +50,8 @@ const translatedResourceName = (resource, translate) =>
const Menu = ({ dense = false }) => {
const open = useSelector((state) => state.admin.ui.sidebarOpen)
const translate = useTranslate()
const classes = useStyles()
const queue = useSelector((state) => state.player?.queue)
const classes = useStyles({ addPadding: queue.length > 0 })
const resources = useSelector(getResources)

// TODO State is not persisted in mobile when you close the sidebar menu. Move to redux?
Expand Down

0 comments on commit b55f3a6

Please sign in to comment.