mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
[Types] Move enum to types file (#3416)
This commit is contained in:
@@ -2,6 +2,7 @@ import { useEventListener, whenever } from '@vueuse/core'
|
|||||||
import { computed, readonly, ref } from 'vue'
|
import { computed, readonly, ref } from 'vue'
|
||||||
|
|
||||||
import { api } from '@/scripts/api'
|
import { api } from '@/scripts/api'
|
||||||
|
import { ManagerWsQueueStatus } from '@/types/comfyManagerTypes'
|
||||||
|
|
||||||
type QueuedTask<T> = {
|
type QueuedTask<T> = {
|
||||||
task: () => Promise<T>
|
task: () => Promise<T>
|
||||||
@@ -10,11 +11,6 @@ type QueuedTask<T> = {
|
|||||||
|
|
||||||
const MANAGER_WS_MSG_TYPE = 'cm-queue-status'
|
const MANAGER_WS_MSG_TYPE = 'cm-queue-status'
|
||||||
|
|
||||||
enum ManagerWsQueueStatus {
|
|
||||||
DONE = 'done',
|
|
||||||
IN_PROGRESS = 'in_progress'
|
|
||||||
}
|
|
||||||
|
|
||||||
export const useManagerQueue = () => {
|
export const useManagerQueue = () => {
|
||||||
const clientQueueItems = ref<QueuedTask<unknown>[]>([])
|
const clientQueueItems = ref<QueuedTask<unknown>[]>([])
|
||||||
const clientQueueLength = computed(() => clientQueueItems.value.length)
|
const clientQueueLength = computed(() => clientQueueItems.value.length)
|
||||||
|
|||||||
@@ -10,6 +10,11 @@ export type PackField = keyof RegistryPack | null
|
|||||||
export const IsInstallingKey: InjectionKey<Ref<boolean>> =
|
export const IsInstallingKey: InjectionKey<Ref<boolean>> =
|
||||||
Symbol('isInstalling')
|
Symbol('isInstalling')
|
||||||
|
|
||||||
|
export enum ManagerWsQueueStatus {
|
||||||
|
DONE = 'done',
|
||||||
|
IN_PROGRESS = 'in_progress'
|
||||||
|
}
|
||||||
|
|
||||||
export enum ManagerTab {
|
export enum ManagerTab {
|
||||||
All = 'all',
|
All = 'all',
|
||||||
Installed = 'installed',
|
Installed = 'installed',
|
||||||
|
|||||||
Reference in New Issue
Block a user