fix: download progress missing when left panel scrollable (#5984)
This commit is contained in:
parent
7a3d9d765c
commit
1e7e572d4a
@ -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,9 +496,9 @@ const LeftPanel = () => {
|
|||||||
</Link>
|
</Link>
|
||||||
)
|
)
|
||||||
})}
|
})}
|
||||||
</div>
|
|
||||||
<DownloadManagement />
|
<DownloadManagement />
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
</aside>
|
</aside>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user