Skip to content

Commit

Permalink
fix: float sidebar missing background
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <tukon479@gmail.com>
  • Loading branch information
Innei committed Nov 9, 2024
1 parent 54d4e52 commit b9982e0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions apps/renderer/src/modules/feed-column/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import { isHotkeyPressed, useHotkeys } from "react-hotkeys-hook"
import { useTranslation } from "react-i18next"

import { useUISettingKey } from "~/atoms/settings/ui"
import { useSidebarActiveView } from "~/atoms/sidebar"
import { HotKeyScopeMap } from "~/constants"
import { useFeedColumnShow, useSidebarActiveView } from "~/atoms/sidebar"
import { HotKeyScopeMap, isElectronBuild } from "~/constants"
import { shortcuts } from "~/constants/shortcuts"
import { useNavigateEntry } from "~/hooks/biz/useNavigateEntry"
import { useReduceMotion } from "~/hooks/biz/useReduceMotion"
Expand Down Expand Up @@ -138,10 +138,16 @@ export function FeedColumn({ children, className }: PropsWithChildren<{ classNam
})

const shouldFreeUpSpace = useShouldFreeUpSpace()
const feedColumnShow = useFeedColumnShow()

return (
<WindowUnderBlur
className={cn("relative flex h-full flex-col space-y-3 pt-2.5", className)}
className={cn(
"relative flex h-full flex-col space-y-3 pt-2.5",

!feedColumnShow && isElectronBuild && "bg-zinc-200/80 backdrop-blur dark:bg-neutral-800/80",
className,
)}
onClick={useCallback(() => navigateBackHome(), [navigateBackHome])}
>
<FeedColumnHeader />
Expand Down
2 changes: 1 addition & 1 deletion apps/renderer/src/pages/(main)/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ const FeedResponsiveResizerContainer = ({
className={cn(
"shrink-0 overflow-hidden",
"absolute inset-y-0 z-[2]",
feedColumnTempShow && !feedColumnShow && "shadow-drawer-to-right z-[12] border-r",
feedColumnTempShow && !feedColumnShow && "shadow-drawer-to-right z-[12]",
!feedColumnShow && !feedColumnTempShow ? "-translate-x-full delay-200" : "",
!isDragging ? "duration-200" : "",
)}
Expand Down

0 comments on commit b9982e0

Please sign in to comment.