Skip to content

Commit 1e7e572

Browse files
authored
fix: download progress missing when left panel scrollable (#5984)
1 parent 7a3d9d7 commit 1e7e572

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

web-app/src/containers/LeftPanel.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import { toast } from 'sonner'
4242
import { DownloadManagement } from '@/containers/DownloadManegement'
4343
import { useSmallScreen } from '@/hooks/useMediaQuery'
4444
import { useClickOutside } from '@/hooks/useClickOutside'
45+
import { useDownloadStore } from '@/hooks/useDownloadStore'
4546

4647
const mainMenus = [
4748
{
@@ -171,6 +172,8 @@ const LeftPanel = () => {
171172
}
172173
}, [isSmallScreen, open])
173174

175+
const { downloads, localDownloadingModels } = useDownloadStore()
176+
174177
return (
175178
<>
176179
{/* Backdrop overlay for small screens */}
@@ -253,7 +256,14 @@ const LeftPanel = () => {
253256
</div>
254257

255258
<div className="flex flex-col justify-between overflow-hidden mt-0 !h-[calc(100%-42px)]">
256-
<div className="flex flex-col !h-[calc(100%-140px)]">
259+
<div
260+
className={cn(
261+
'flex flex-col',
262+
Object.keys(downloads).length > 0 || localDownloadingModels.size > 0
263+
? 'h-[calc(100%-200px)]'
264+
: 'h-[calc(100%-140px)]'
265+
)}
266+
>
257267
{IS_MACOS && (
258268
<div
259269
ref={searchContainerMacRef}
@@ -486,8 +496,8 @@ const LeftPanel = () => {
486496
</Link>
487497
)
488498
})}
499+
<DownloadManagement />
489500
</div>
490-
<DownloadManagement />
491501
</div>
492502
</aside>
493503
</>

0 commit comments

Comments
 (0)