Skip to content

Commit

Permalink
Simplify queue button to be a single button rather than being nested
Browse files Browse the repository at this point in the history
  • Loading branch information
espidev committed Jul 26, 2023
1 parent 1f3be91 commit 85d6fd3
Showing 1 changed file with 4 additions and 20 deletions.
24 changes: 4 additions & 20 deletions website/components/mediaplayer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,15 @@ import {
SkipNextOutlined,
SkipPreviousOutlined,
QueueMusicOutlined,
RepeatOn,
RepeatOneOn,
RepeatOnOutlined,
RepeatOneOnOutlined
} from "@mui/icons-material";
import { useLoginStateContext } from "./loginstateprovider";
import {styled} from "@mui/system"
import { ThemeProvider } from '@mui/material/styles';
import { lightTheme, darkTheme } from './themes';
import { Button, Menu, MenuItem, ListItemIcon, Typography, CssBaseline, Popover, Modal } from '@mui/material';
import TrackTable from './trackTable';
import { CssBaseline, Popover } from '@mui/material';
import QueueTrackTable from './queueTrackTable';
import { APITrack } from '@/util/models/track';

const FooterPanel = styled('div')(({theme}) => ({
padding: '1em',
Expand Down Expand Up @@ -125,18 +121,8 @@ export default function MediaPlayer() {
<li className="media-clickable" onClick={() => appState.goToNextTrack()}><SkipNextOutlined sx={{color}} /></li>
);
const QueueButton = (
<li className="media-clickable" onClick={() => {}}>
<Button
onClick={(event) => handleMenuClick(event, anchorRef)}
sx={{ borderRadius: '1em', padding: 0, margin: 0, width: "0.5em" }}
id="positioned-button"
aria-controls={queueOpen ? 'positioned-queue' : undefined}
aria-haspopup="true"
aria-expanded={queueOpen ? 'true' : undefined}
aria-selected={queueOpen}
>
<QueueMusicOutlined fontSize="small" sx={{color}}/>
</Button>
<li className="media-clickable" onClick={(event) => handleMenuClick(event, anchorRef)}>
<QueueMusicOutlined fontSize="small" sx={{color}}/>

<Popover
id="positioned-queue"
Expand All @@ -155,9 +141,7 @@ export default function MediaPlayer() {
>
<div style={{width: "30em", height: "30em", overflow: "hidden"}}>
<QueueTrackTable/>
</div>


</div>
</Popover>


Expand Down

0 comments on commit 85d6fd3

Please sign in to comment.