Adjust conditionals in a few places
This commit is contained in:
parent
a878875f83
commit
1d074dae2e
3 changed files with 12 additions and 10 deletions
|
@ -34,14 +34,18 @@ const StyledNativeScrollArea = styled.div<{ scrollBarOffset?: string; windowBarS
|
||||||
|
|
||||||
&::-webkit-scrollbar-track {
|
&::-webkit-scrollbar-track {
|
||||||
margin-top: ${(props) =>
|
margin-top: ${(props) =>
|
||||||
props.windowBarStyle === Platform.WINDOWS || props.windowBarStyle === Platform.MACOS
|
props.windowBarStyle === Platform.WINDOWS ||
|
||||||
|
props.windowBarStyle === Platform.MACOS ||
|
||||||
|
props.windowBarStyle === Platform.LINUX
|
||||||
? '0px'
|
? '0px'
|
||||||
: props.scrollBarOffset || '65px'};
|
: props.scrollBarOffset || '65px'};
|
||||||
}
|
}
|
||||||
|
|
||||||
&::-webkit-scrollbar-thumb {
|
&::-webkit-scrollbar-thumb {
|
||||||
margin-top: ${(props) =>
|
margin-top: ${(props) =>
|
||||||
props.windowBarStyle === Platform.WINDOWS || props.windowBarStyle === Platform.MACOS
|
props.windowBarStyle === Platform.WINDOWS ||
|
||||||
|
props.windowBarStyle === Platform.MACOS ||
|
||||||
|
props.windowBarStyle === Platform.LINUX
|
||||||
? '0px'
|
? '0px'
|
||||||
: props.scrollBarOffset || '65px'};
|
: props.scrollBarOffset || '65px'};
|
||||||
}
|
}
|
||||||
|
|
|
@ -138,9 +138,7 @@ const HomeRoute = () => {
|
||||||
<Box
|
<Box
|
||||||
ref={cq.ref}
|
ref={cq.ref}
|
||||||
mb="5rem"
|
mb="5rem"
|
||||||
pt={
|
pt={windowBarStyle === Platform.WEB ? '5rem' : '3rem'}
|
||||||
windowBarStyle === Platform.WEB || windowBarStyle === Platform.LINUX ? '5rem' : '3rem'
|
|
||||||
}
|
|
||||||
px="2rem"
|
px="2rem"
|
||||||
>
|
>
|
||||||
<Stack spacing="lg">
|
<Stack spacing="lg">
|
||||||
|
|
|
@ -13,17 +13,17 @@ export const SidebarPlayQueue = () => {
|
||||||
const queueRef = useRef<{ grid: AgGridReactType<Song> } | null>(null);
|
const queueRef = useRef<{ grid: AgGridReactType<Song> } | null>(null);
|
||||||
const { windowBarStyle } = useWindowSettings();
|
const { windowBarStyle } = useWindowSettings();
|
||||||
|
|
||||||
const webOrNative = windowBarStyle === Platform.WEB || windowBarStyle === Platform.LINUX;
|
const isWeb = windowBarStyle === Platform.WEB;
|
||||||
return (
|
return (
|
||||||
<VirtualGridContainer>
|
<VirtualGridContainer>
|
||||||
{webOrNative && (
|
{isWeb && (
|
||||||
<Stack mr={webOrNative ? '130px' : undefined}>
|
<Stack mr={isWeb ? '130px' : undefined}>
|
||||||
<PageHeader backgroundColor="var(--titlebar-bg)" />
|
<PageHeader backgroundColor="var(--titlebar-bg)" />
|
||||||
</Stack>
|
</Stack>
|
||||||
)}
|
)}
|
||||||
<Paper
|
<Paper
|
||||||
display={!webOrNative ? 'flex' : undefined}
|
display={!isWeb ? 'flex' : undefined}
|
||||||
h={!webOrNative ? '65px' : undefined}
|
h={!isWeb ? '65px' : undefined}
|
||||||
>
|
>
|
||||||
<PlayQueueListControls
|
<PlayQueueListControls
|
||||||
tableRef={queueRef}
|
tableRef={queueRef}
|
||||||
|
|
Reference in a new issue