fix: download progress missing when left panel scrollable (#5984)

This commit is contained in:
Faisal Amir 2025-07-30 18:36:42 +07:00 committed by GitHub
parent 7a3d9d765c
commit 1e7e572d4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,6 +42,7 @@ import { toast } from 'sonner'
import { DownloadManagement } from '@/containers/DownloadManegement' import { DownloadManagement } from '@/containers/DownloadManegement'
import { useSmallScreen } from '@/hooks/useMediaQuery' import { useSmallScreen } from '@/hooks/useMediaQuery'
import { useClickOutside } from '@/hooks/useClickOutside' import { useClickOutside } from '@/hooks/useClickOutside'
import { useDownloadStore } from '@/hooks/useDownloadStore'
const mainMenus = [ const mainMenus = [
{ {
@ -171,6 +172,8 @@ const LeftPanel = () => {
} }
}, [isSmallScreen, open]) }, [isSmallScreen, open])
const { downloads, localDownloadingModels } = useDownloadStore()
return ( return (
<> <>
{/* Backdrop overlay for small screens */} {/* Backdrop overlay for small screens */}
@ -253,7 +256,14 @@ const LeftPanel = () => {
</div> </div>
<div className="flex flex-col justify-between overflow-hidden mt-0 !h-[calc(100%-42px)]"> <div className="flex flex-col justify-between overflow-hidden mt-0 !h-[calc(100%-42px)]">
<div className="flex flex-col !h-[calc(100%-140px)]"> <div
className={cn(
'flex flex-col',
Object.keys(downloads).length > 0 || localDownloadingModels.size > 0
? 'h-[calc(100%-200px)]'
: 'h-[calc(100%-140px)]'
)}
>
{IS_MACOS && ( {IS_MACOS && (
<div <div
ref={searchContainerMacRef} ref={searchContainerMacRef}
@ -486,8 +496,8 @@ const LeftPanel = () => {
</Link> </Link>
) )
})} })}
<DownloadManagement />
</div> </div>
<DownloadManagement />
</div> </div>
</aside> </aside>
</> </>