Skip to content

Commit b9982e0

Browse files
committed
fix: float sidebar missing background
Signed-off-by: Innei <tukon479@gmail.com>
1 parent 54d4e52 commit b9982e0

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

apps/renderer/src/modules/feed-column/index.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import { isHotkeyPressed, useHotkeys } from "react-hotkeys-hook"
1414
import { useTranslation } from "react-i18next"
1515

1616
import { useUISettingKey } from "~/atoms/settings/ui"
17-
import { useSidebarActiveView } from "~/atoms/sidebar"
18-
import { HotKeyScopeMap } from "~/constants"
17+
import { useFeedColumnShow, useSidebarActiveView } from "~/atoms/sidebar"
18+
import { HotKeyScopeMap, isElectronBuild } from "~/constants"
1919
import { shortcuts } from "~/constants/shortcuts"
2020
import { useNavigateEntry } from "~/hooks/biz/useNavigateEntry"
2121
import { useReduceMotion } from "~/hooks/biz/useReduceMotion"
@@ -138,10 +138,16 @@ export function FeedColumn({ children, className }: PropsWithChildren<{ classNam
138138
})
139139

140140
const shouldFreeUpSpace = useShouldFreeUpSpace()
141+
const feedColumnShow = useFeedColumnShow()
141142

142143
return (
143144
<WindowUnderBlur
144-
className={cn("relative flex h-full flex-col space-y-3 pt-2.5", className)}
145+
className={cn(
146+
"relative flex h-full flex-col space-y-3 pt-2.5",
147+
148+
!feedColumnShow && isElectronBuild && "bg-zinc-200/80 backdrop-blur dark:bg-neutral-800/80",
149+
className,
150+
)}
145151
onClick={useCallback(() => navigateBackHome(), [navigateBackHome])}
146152
>
147153
<FeedColumnHeader />

apps/renderer/src/pages/(main)/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ const FeedResponsiveResizerContainer = ({
294294
className={cn(
295295
"shrink-0 overflow-hidden",
296296
"absolute inset-y-0 z-[2]",
297-
feedColumnTempShow && !feedColumnShow && "shadow-drawer-to-right z-[12] border-r",
297+
feedColumnTempShow && !feedColumnShow && "shadow-drawer-to-right z-[12]",
298298
!feedColumnShow && !feedColumnTempShow ? "-translate-x-full delay-200" : "",
299299
!isDragging ? "duration-200" : "",
300300
)}

0 commit comments

Comments
 (0)