mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-29 10:42:44 +00:00
refactor: simplify PackInstallButton isInstalling state management
- Remove isInstalling prop from PackInstallButton component - Use internal computed property with comfyManagerStore.isPackInstalling() - Remove redundant isInstalling computations from parent components - Fix test mocks for useConflictDetection and es-toolkit/compat - Clean up unused imports and inject dependencies This centralizes the installation state management in the store, reducing code duplication and complexity across components. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -21,6 +21,12 @@ vi.mock('@/stores/dialogStore')
|
||||
vi.mock('@/stores/settingStore')
|
||||
vi.mock('@/stores/commandStore')
|
||||
vi.mock('@/services/comfyManagerService')
|
||||
vi.mock('@/composables/useConflictDetection', () => ({
|
||||
useConflictDetection: vi.fn(() => ({
|
||||
conflictedPackages: { value: [] },
|
||||
performConflictDetection: vi.fn().mockResolvedValue(undefined)
|
||||
}))
|
||||
}))
|
||||
|
||||
// Mock useEventListener to capture the event handler
|
||||
let reconnectHandler: (() => void) | null = null
|
||||
|
||||
Reference in New Issue
Block a user