mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-04 04:30:04 +00:00
feat: invoke getCustomVueWidgets hook when registering extensions
This commit is contained in:
@@ -2,6 +2,7 @@ import { useCurrentUser } from '@/composables/auth/useCurrentUser'
|
||||
import { useErrorHandling } from '@/composables/useErrorHandling'
|
||||
import { legacyMenuCompat } from '@/lib/litegraph/src/contextMenuCompat'
|
||||
import { useSettingStore } from '@/platform/settings/settingStore'
|
||||
import { registerVueWidgets } from '@/renderer/extensions/vueNodes/widgets/registry/widgetRegistry'
|
||||
import { api } from '@/scripts/api'
|
||||
import { app } from '@/scripts/app'
|
||||
import { useCommandStore } from '@/stores/commandStore'
|
||||
@@ -80,6 +81,15 @@ export const useExtensionService = () => {
|
||||
})()
|
||||
}
|
||||
|
||||
if (extension.getCustomVueWidgets) {
|
||||
void (async () => {
|
||||
if (extension.getCustomVueWidgets) {
|
||||
const vueWidgets = await extension.getCustomVueWidgets(app)
|
||||
registerVueWidgets(vueWidgets)
|
||||
}
|
||||
})()
|
||||
}
|
||||
|
||||
if (extension.onAuthUserResolved) {
|
||||
const { onUserResolved } = useCurrentUser()
|
||||
const handleUserResolved = wrapWithErrorHandlingAsync(
|
||||
|
||||
Reference in New Issue
Block a user