diff --git a/src/App.vue b/src/App.vue index 6b7c56be07..7ba2d05f68 100644 --- a/src/App.vue +++ b/src/App.vue @@ -17,6 +17,7 @@ import { computed, onMounted } from 'vue' import GlobalDialog from '@/components/dialog/GlobalDialog.vue' import config from '@/config' import { t } from '@/i18n' +import { useSettingStore } from '@/platform/settings/settingStore' import { useWorkflowStore } from '@/platform/workflow/management/stores/workflowStore' import { app } from '@/scripts/app' import { useDialogService } from '@/services/dialogService' @@ -47,7 +48,7 @@ const showContextMenu = (event: MouseEvent) => { } } -onMounted(() => { +onMounted(async () => { window['__COMFYUI_FRONTEND_VERSION__'] = config.app_version if (isElectron()) { @@ -77,5 +78,25 @@ onMounted(() => { // Initialize conflict detection in background // This runs async and doesn't block UI setup void conflictDetection.initializeConflictDetection() + + // Show cloud notification for macOS desktop users (one-time) + // Delayed to ensure it appears after workflow loading (missing models dialog, etc.) + if (isElectron()) { + const isMacOS = navigator.platform.toLowerCase().includes('mac') + if (isMacOS) { + const settingStore = useSettingStore() + const hasShownNotification = settingStore.get( + 'Comfy.Desktop.CloudNotificationShown' + ) + + if (!hasShownNotification) { + // Delay to show after initial workflow loading completes + setTimeout(async () => { + dialogService.showCloudNotification() + await settingStore.set('Comfy.Desktop.CloudNotificationShown', true) + }, 2000) + } + } + } }) diff --git a/src/components/dialog/content/CloudNotificationContent.vue b/src/components/dialog/content/CloudNotificationContent.vue new file mode 100644 index 0000000000..e2c654f27f --- /dev/null +++ b/src/components/dialog/content/CloudNotificationContent.vue @@ -0,0 +1,126 @@ + + + diff --git a/src/locales/en/main.json b/src/locales/en/main.json index 45c27782d0..85645d9113 100644 --- a/src/locales/en/main.json +++ b/src/locales/en/main.json @@ -2212,5 +2212,18 @@ "description": "This workflow uses custom nodes you haven't installed yet.", "replacementInstruction": "Install these nodes to run this workflow, or replace them with installed alternatives. Missing nodes are highlighted in red on the canvas." } + }, + "cloudNotification": { + "title": "Discover Comfy Cloud", + "message": "Get access to industry-grade GPUs and run workflows up to 10x faster", + "feature1Title": "No Setup Required", + "feature1": "Start creating instantly with popular models pre-installed", + "feature2Title": "Powerful GPUs", + "feature2": "A100 and RTX PRO 6000 GPUs for heavy video models", + "feature3Title": "$20/month", + "feature3": "Simple subscription with unlimited workflow runs", + "feature4": "ComfyUI stays free and open source.\nCloud is optional—for instant access to high-end GPUs.", + "continueLocally": "Continue Locally", + "exploreCloud": "Explore Cloud" } } \ No newline at end of file diff --git a/src/platform/settings/constants/coreSettings.ts b/src/platform/settings/constants/coreSettings.ts index 0493f2f00d..9a361e2c3e 100644 --- a/src/platform/settings/constants/coreSettings.ts +++ b/src/platform/settings/constants/coreSettings.ts @@ -293,6 +293,12 @@ export const CORE_SETTINGS: SettingParams[] = [ type: 'boolean', defaultValue: true }, + { + id: 'Comfy.Desktop.CloudNotificationShown', + name: 'Cloud notification shown', + type: 'boolean', + defaultValue: false + }, { id: 'Comfy.Graph.ZoomSpeed', category: ['LiteGraph', 'Canvas', 'ZoomSpeed'], diff --git a/src/schemas/apiSchema.ts b/src/schemas/apiSchema.ts index abf2a0b784..6406b6f558 100644 --- a/src/schemas/apiSchema.ts +++ b/src/schemas/apiSchema.ts @@ -374,6 +374,7 @@ const zSettings = z.object({ 'Comfy.Workflow.ShowMissingNodesWarning': z.boolean(), 'Comfy.Workflow.ShowMissingModelsWarning': z.boolean(), 'Comfy.Workflow.WarnBlueprintOverwrite': z.boolean(), + 'Comfy.Desktop.CloudNotificationShown': z.boolean(), 'Comfy.DisableFloatRounding': z.boolean(), 'Comfy.DisableSliders': z.boolean(), 'Comfy.DOMClippingEnabled': z.boolean(), diff --git a/src/services/dialogService.ts b/src/services/dialogService.ts index ff08ad1549..c4c9d8848c 100644 --- a/src/services/dialogService.ts +++ b/src/services/dialogService.ts @@ -2,6 +2,7 @@ import { merge } from 'es-toolkit/compat' import type { Component } from 'vue' import ApiNodesSignInContent from '@/components/dialog/content/ApiNodesSignInContent.vue' +import CloudNotificationContent from '@/components/dialog/content/CloudNotificationContent.vue' import MissingNodesContent from '@/components/dialog/content/MissingNodesContent.vue' import MissingNodesFooter from '@/components/dialog/content/MissingNodesFooter.vue' import MissingNodesHeader from '@/components/dialog/content/MissingNodesHeader.vue' @@ -541,6 +542,16 @@ export const useDialogService = () => { show() } + function showCloudNotification() { + dialogStore.showDialog({ + key: 'global-cloud-notification', + component: CloudNotificationContent, + dialogComponentProps: { + closable: true + } + }) + } + return { showLoadWorkflowWarning, showMissingModelsWarning, @@ -555,6 +566,7 @@ export const useDialogService = () => { showTopUpCreditsDialog, showUpdatePasswordDialog, showExtensionDialog, + showCloudNotification, prompt, showErrorDialog, confirm,