Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

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

Faisal Amir1e7e572d4a25
diff --git a/web-app/src/containers/LeftPanel.tsx b/web-app/src/containers/LeftPanel.tsx
index 0f7269552..5d821a2b5 100644
--- a/web-app/src/containers/LeftPanel.tsx
+++ b/web-app/src/containers/LeftPanel.tsx
@@ -42,6 +42,7 @@ import { toast } from 'sonner'
import { DownloadManagement } from '@/containers/DownloadManegement'
import { useSmallScreen } from '@/hooks/useMediaQuery'
import { useClickOutside } from '@/hooks/useClickOutside'
+import { useDownloadStore } from '@/hooks/useDownloadStore'
const mainMenus = [
{
@@ -171,6 +172,8 @@ const LeftPanel = () => {
}
}, [isSmallScreen, open])
+ const { downloads, localDownloadingModels } = useDownloadStore()
+
return (
<>
{/* Backdrop overlay for small screens */}
@@ -253,7 +256,14 @@ const LeftPanel = () => {
</div>
<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 && (
<div
ref={searchContainerMacRef}
@@ -486,8 +496,8 @@ const LeftPanel = () => {
</Link>
)
})}
+ <DownloadManagement />
</div>
- <DownloadManagement />
</div>
</aside>
</>