[Types] Move enum to types file (#3416)

This commit is contained in:
Christian Byrne
2025-04-12 23:11:41 +08:00
committed by GitHub
parent e4a5355f58
commit d098d6ae4e
2 changed files with 6 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ import { useEventListener, whenever } from '@vueuse/core'
import { computed, readonly, ref } from 'vue'
import { api } from '@/scripts/api'
import { ManagerWsQueueStatus } from '@/types/comfyManagerTypes'
type QueuedTask<T> = {
task: () => Promise<T>
@@ -10,11 +11,6 @@ type QueuedTask<T> = {
const MANAGER_WS_MSG_TYPE = 'cm-queue-status'
enum ManagerWsQueueStatus {
DONE = 'done',
IN_PROGRESS = 'in_progress'
}
export const useManagerQueue = () => {
const clientQueueItems = ref<QueuedTask<unknown>[]>([])
const clientQueueLength = computed(() => clientQueueItems.value.length)

View File

@@ -10,6 +10,11 @@ export type PackField = keyof RegistryPack | null
export const IsInstallingKey: InjectionKey<Ref<boolean>> =
Symbol('isInstalling')
export enum ManagerWsQueueStatus {
DONE = 'done',
IN_PROGRESS = 'in_progress'
}
export enum ManagerTab {
All = 'all',
Installed = 'installed',