diff --git a/web-app/src/containers/DownloadManegement.tsx b/web-app/src/containers/DownloadManegement.tsx index f91a943d3..92bb3ee85 100644 --- a/web-app/src/containers/DownloadManegement.tsx +++ b/web-app/src/containers/DownloadManegement.tsx @@ -400,20 +400,23 @@ export function DownloadManagement() { className="text-main-view-fg/70 cursor-pointer" title="Cancel download" onClick={() => { - serviceHub.models().abortDownload(download.name).then(() => { - toast.info( - t('common:toast.downloadCancelled.title'), - { - id: 'cancel-download', - description: t( - 'common:toast.downloadCancelled.description' - ), + serviceHub + .models() + .abortDownload(download.name) + .then(() => { + toast.info( + t('common:toast.downloadCancelled.title'), + { + id: 'cancel-download', + description: t( + 'common:toast.downloadCancelled.description' + ), + } + ) + if (downloadProcesses.length === 0) { + setIsPopoverOpen(false) } - ) - if (downloadProcesses.length === 0) { - setIsPopoverOpen(false) - } - }) + }) }} /> diff --git a/web-app/src/containers/LeftPanel.tsx b/web-app/src/containers/LeftPanel.tsx index da596dd4a..1ad0ef560 100644 --- a/web-app/src/containers/LeftPanel.tsx +++ b/web-app/src/containers/LeftPanel.tsx @@ -35,7 +35,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' + import { DeleteAllThreadsDialog } from '@/containers/dialogs' const mainMenus = [ @@ -122,7 +122,7 @@ const LeftPanel = () => { ) { if (currentIsSmallScreen && open) { setLeftPanel(false) - } else if(!open) { + } else if (!open) { setLeftPanel(true) } prevScreenSizeRef.current = currentIsSmallScreen @@ -179,8 +179,6 @@ const LeftPanel = () => { } }, [isSmallScreen, open]) - const { downloads, localDownloadingModels } = useDownloadStore() - return ( <> {/* Backdrop overlay for small screens */} @@ -262,15 +260,8 @@ const LeftPanel = () => { )} -