mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
Remove vueuse/router
This commit is contained in:
@@ -158,7 +158,6 @@
|
||||
"@tiptap/starter-kit": "^2.10.4",
|
||||
"@vueuse/core": "catalog:",
|
||||
"@vueuse/integrations": "catalog:",
|
||||
"@vueuse/router": "^14.0.0",
|
||||
"@xterm/addon-fit": "^0.10.0",
|
||||
"@xterm/addon-serialize": "^0.13.0",
|
||||
"@xterm/xterm": "^5.5.0",
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import QuickLRU from '@alloc/quick-lru'
|
||||
import { defineStore } from 'pinia'
|
||||
import { computed, ref, shallowRef, watch } from 'vue'
|
||||
import { useRouteHash } from '@vueuse/router'
|
||||
|
||||
import type { DragAndScaleState } from '@/lib/litegraph/src/DragAndScale'
|
||||
import type { Subgraph } from '@/lib/litegraph/src/litegraph'
|
||||
@@ -158,7 +157,12 @@ export const useSubgraphNavigationStore = defineStore(
|
||||
onNavigated(newValue, oldValue)
|
||||
}
|
||||
)
|
||||
const routeHash = useRouteHash()
|
||||
const routeHash = ref(window.location.hash)
|
||||
const originalOnHashChange = window.onhashchange
|
||||
window.onhashchange = (...args) => {
|
||||
routeHash.value = window.location.hash
|
||||
return originalOnHashChange?.apply(window, args)
|
||||
}
|
||||
let blockHashUpdate = false
|
||||
let initialLoad = true
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { createPinia, setActivePinia } from 'pinia'
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import { nextTick, ref } from 'vue'
|
||||
import { nextTick } from 'vue'
|
||||
|
||||
import { useWorkflowStore } from '@/platform/workflow/management/stores/workflowStore'
|
||||
import type { ComfyWorkflow } from '@/platform/workflow/management/stores/workflowStore'
|
||||
@@ -41,10 +41,6 @@ vi.mock('@/renderer/core/canvas/canvasStore', () => ({
|
||||
})
|
||||
}))
|
||||
|
||||
vi.mock('@vueuse/router', () => ({
|
||||
useRouteHash: () => ref('')
|
||||
}))
|
||||
|
||||
// Get reference to mock canvas
|
||||
const mockCanvas = app.canvas as any
|
||||
|
||||
|
||||
Reference in New Issue
Block a user