mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 10:23:33 +00:00
fix sidebar height when using custom window bar
This commit is contained in:
parent
f4db8fdb84
commit
d922d8b034
2 changed files with 11 additions and 1 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue