mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-17 14:10:14 +02:00
fix sidebar height when using custom window bar
This commit is contained in:
@@ -8,6 +8,10 @@
|
|||||||
background: var(--theme-colors-background-alternate);
|
background: var(--theme-colors-background-alternate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.container.custom-bar {
|
||||||
|
max-height: calc(100vh - 120px);
|
||||||
|
}
|
||||||
|
|
||||||
.scroll-area {
|
.scroll-area {
|
||||||
padding: 0 var(--theme-spacing-md) var(--theme-spacing-md) var(--theme-spacing-md);
|
padding: 0 var(--theme-spacing-md) var(--theme-spacing-md) var(--theme-spacing-md);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import clsx from 'clsx';
|
||||||
import { AnimatePresence, motion } from 'motion/react';
|
import { AnimatePresence, motion } from 'motion/react';
|
||||||
import { CSSProperties, useMemo } from 'react';
|
import { CSSProperties, useMemo } from 'react';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
@@ -98,9 +99,14 @@ export const Sidebar = () => {
|
|||||||
return '100%';
|
return '100%';
|
||||||
}, [showImage, sidebar.leftWidth, windowBarStyle]);
|
}, [showImage, sidebar.leftWidth, windowBarStyle]);
|
||||||
|
|
||||||
|
const isCustomWindowBar =
|
||||||
|
windowBarStyle === Platform.WINDOWS || windowBarStyle === Platform.MACOS;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={styles.container}
|
className={clsx(styles.container, {
|
||||||
|
[styles.customBar]: isCustomWindowBar,
|
||||||
|
})}
|
||||||
id="left-sidebar"
|
id="left-sidebar"
|
||||||
>
|
>
|
||||||
<Group
|
<Group
|
||||||
|
|||||||
Reference in New Issue
Block a user