diff --git a/src/renderer/components/page-header/index.tsx b/src/renderer/components/page-header/index.tsx index d297c0d0..37e88574 100644 --- a/src/renderer/components/page-header/index.tsx +++ b/src/renderer/components/page-header/index.tsx @@ -79,24 +79,6 @@ const TitleWrapper = styled(motion.div)` height: 100%; `; -const DragContainer = styled.div` - position: absolute; - top: 0; - left: 0; - z-index: -1; - width: calc(100% - 130px); - height: 65px; - -webkit-app-region: drag; - - button { - -webkit-app-region: no-drag; - } - - input { - -webkit-app-region: no-drag; - } -`; - const variants: Variants = { animate: { opacity: 1, @@ -125,40 +107,35 @@ export const PageHeader = ({ return ( <> - {windowBarStyle === Platform.WEB && } - {!isHidden && ( - +
-
- - - {children} - - -
- {backgroundColor && ( - <> - - - - )} - - )} + + + {children} + + +
+ {backgroundColor && ( + <> + + + + )} +
); }; diff --git a/src/renderer/components/scroll-area/index.tsx b/src/renderer/components/scroll-area/index.tsx index 663b545c..aa0b7fff 100644 --- a/src/renderer/components/scroll-area/index.tsx +++ b/src/renderer/components/scroll-area/index.tsx @@ -9,6 +9,24 @@ import { PageHeader, PageHeaderProps } from '/@/renderer/components/page-header' import { useWindowSettings } from '/@/renderer/store/settings.store'; import { Platform } from '/@/renderer/types'; +const DragContainer = styled.div` + position: absolute; + top: 0; + left: 0; + z-index: -1; + width: calc(100% - 130px); + height: 65px; + -webkit-app-region: drag; + + button { + -webkit-app-region: no-drag; + } + + input { + -webkit-app-region: no-drag; + } +`; + interface ScrollAreaProps extends MantineScrollAreaProps { children: ReactNode; } @@ -128,12 +146,15 @@ export const NativeScrollArea = forwardRef( return ( <> - + {windowBarStyle === Platform.WEB && } + {shouldShowHeader && ( + + )}