feat: Remove successful model downloads (#1710)

* feat: Remove successful model downloads

* PR comments

---------

Co-authored-by: Oto Ciulis <oto.ciulis@gmail.com>
This commit is contained in:
oto-ciulis-tt
2024-11-27 07:40:43 -08:00
committed by GitHub
parent 1ac6d6529f
commit 2d022e4e49
3 changed files with 14 additions and 9 deletions

View File

@@ -1,8 +1,8 @@
import { ref } from 'vue'
import { computed, ref } from 'vue'
import { defineStore } from 'pinia'
import { isElectron, electronAPI } from '@/utils/envUtil'
import type {
DownloadState,
import {
type DownloadState,
DownloadStatus
} from '@comfyorg/comfyui-electron-types'
@@ -69,6 +69,11 @@ export const useElectronDownloadStore = defineStore('downloads', () => {
resume,
cancel,
findByUrl,
initialize
initialize,
inProgressDownloads: computed(() =>
downloads.value.filter(
({ status }) => status !== DownloadStatus.COMPLETED
)
)
}
})