Fix window controls when sidebar queue enabled (#36)

This commit is contained in:
jeffvli 2023-03-29 20:39:59 -07:00
parent 4ffc544e87
commit 0c13b09029

View file

@ -5,16 +5,24 @@ import { PlayQueue } from '/@/renderer/features/now-playing/components/play-queu
import { PlayQueueListControls } from './play-queue-list-controls'; import { PlayQueueListControls } from './play-queue-list-controls';
import { Song } from '/@/renderer/api/types'; import { Song } from '/@/renderer/api/types';
import { PageHeader, Paper, VirtualGridContainer } from '/@/renderer/components'; import { PageHeader, Paper, VirtualGridContainer } from '/@/renderer/components';
import { useGeneralSettings } from '/@/renderer/store/settings.store';
import { Platform } from '/@/renderer/types';
export const SidebarPlayQueue = () => { export const SidebarPlayQueue = () => {
const queueRef = useRef<{ grid: AgGridReactType<Song> } | null>(null); const queueRef = useRef<{ grid: AgGridReactType<Song> } | null>(null);
const { windowBarStyle } = useGeneralSettings();
return ( return (
<VirtualGridContainer> <VirtualGridContainer>
<Stack> {windowBarStyle === Platform.WEB && (
<Stack mr={windowBarStyle === Platform.WEB ? '130px' : undefined}>
<PageHeader backgroundColor="var(--titlebar-bg)" /> <PageHeader backgroundColor="var(--titlebar-bg)" />
</Stack> </Stack>
<Paper> )}
<Paper
display={windowBarStyle !== Platform.WEB ? 'flex' : undefined}
h={windowBarStyle !== Platform.WEB ? '65px' : undefined}
>
<PlayQueueListControls <PlayQueueListControls
tableRef={queueRef} tableRef={queueRef}
type="sideQueue" type="sideQueue"