diff --git a/src/components/dialog/content/CloudMissingNodesContent.vue b/src/components/dialog/content/CloudMissingNodesContent.vue new file mode 100644 index 000000000..108bfd0e3 --- /dev/null +++ b/src/components/dialog/content/CloudMissingNodesContent.vue @@ -0,0 +1,70 @@ + + + diff --git a/src/components/dialog/content/CloudMissingNodesFooter.vue b/src/components/dialog/content/CloudMissingNodesFooter.vue new file mode 100644 index 000000000..ee00cf54b --- /dev/null +++ b/src/components/dialog/content/CloudMissingNodesFooter.vue @@ -0,0 +1,37 @@ + + + diff --git a/src/components/dialog/content/CloudMissingNodesHeader.vue b/src/components/dialog/content/CloudMissingNodesHeader.vue new file mode 100644 index 000000000..21055ac56 --- /dev/null +++ b/src/components/dialog/content/CloudMissingNodesHeader.vue @@ -0,0 +1,10 @@ + diff --git a/src/locales/en/main.json b/src/locales/en/main.json index c49a73548..5a297bf23 100644 --- a/src/locales/en/main.json +++ b/src/locales/en/main.json @@ -2049,6 +2049,18 @@ "vueNodesBanner": { "message": "Nodes just got a new look and feel", "tryItOut": "Try it out" + }, + "cloud": { + "missingNodes": { + "title": "These nodes aren't available on Comfy Cloud yet", + "description": "This workflow uses custom nodes that aren't supported in the Cloud version yet.", + "priorityMessage": "We've automatically flagged these nodes so we can prioritize adding them.", + "missingNodes": "Missing Nodes", + "replacementInstruction": "In the meantime, replace these nodes (highlighted red on the canvas) with supported ones if possible, or try a different workflow.", + "learnMore": "Learn more", + "gotIt": "Ok, got it", + "cannotRun": "Workflow contains unsupported nodes (highlighted red). Remove these to run the workflow. " + } } } diff --git a/src/scripts/app.ts b/src/scripts/app.ts index d26698c62..0390bd157 100644 --- a/src/scripts/app.ts +++ b/src/scripts/app.ts @@ -1001,7 +1001,11 @@ export class ComfyApp { private showMissingNodesError(missingNodeTypes: MissingNodeType[]) { if (useSettingStore().get('Comfy.Workflow.ShowMissingNodesWarning')) { - useDialogService().showLoadWorkflowWarning({ missingNodeTypes }) + if (isCloud) { + useDialogService().showCloudLoadWorkflowWarning({ missingNodeTypes }) + } else { + useDialogService().showLoadWorkflowWarning({ missingNodeTypes }) + } } } diff --git a/src/services/dialogService.ts b/src/services/dialogService.ts index db4202ae7..c31905280 100644 --- a/src/services/dialogService.ts +++ b/src/services/dialogService.ts @@ -2,6 +2,9 @@ import { merge } from 'es-toolkit/compat' import type { Component } from 'vue' import ApiNodesSignInContent from '@/components/dialog/content/ApiNodesSignInContent.vue' +import CloudMissingNodesContent from '@/components/dialog/content/CloudMissingNodesContent.vue' +import CloudMissingNodesFooter from '@/components/dialog/content/CloudMissingNodesFooter.vue' +import CloudMissingNodesHeader from '@/components/dialog/content/CloudMissingNodesHeader.vue' import ConfirmationDialogContent from '@/components/dialog/content/ConfirmationDialogContent.vue' import ErrorDialogContent from '@/components/dialog/content/ErrorDialogContent.vue' import LoadWorkflowWarning from '@/components/dialog/content/LoadWorkflowWarning.vue' @@ -32,6 +35,7 @@ import NodeConflictDialogContent from '@/workbench/extensions/manager/components import NodeConflictFooter from '@/workbench/extensions/manager/components/manager/NodeConflictFooter.vue' import NodeConflictHeader from '@/workbench/extensions/manager/components/manager/NodeConflictHeader.vue' import type { ConflictDetectionResult } from '@/workbench/extensions/manager/types/conflictDetectionTypes' +import type { ComponentProps } from 'vue-component-type-helpers' export type ConfirmationDialogType = | 'default' @@ -53,6 +57,31 @@ export const useDialogService = () => { }) } + function showCloudLoadWorkflowWarning( + props: ComponentProps + ) { + dialogStore.showDialog({ + key: 'global-cloud-missing-nodes', + headerComponent: CloudMissingNodesHeader, + footerComponent: CloudMissingNodesFooter, + component: CloudMissingNodesContent, + dialogComponentProps: { + closable: true, + pt: { + header: { class: '!p-0 !m-0' }, + content: { class: '!p-0 overflow-y-hidden' }, + footer: { class: '!p-0' }, + pcCloseButton: { + root: { + class: '!w-7 !h-7 !border-none !outline-none !p-2 !m-1.5' + } + } + } + }, + props + }) + } + function showMissingModelsWarning( props: InstanceType['$props'] ) { @@ -520,6 +549,7 @@ export const useDialogService = () => { return { showLoadWorkflowWarning, + showCloudLoadWorkflowWarning, showMissingModelsWarning, showSettingsDialog, showAboutDialog,