diff --git a/global.d.ts b/global.d.ts index 5493cbb18..059e47732 100644 --- a/global.d.ts +++ b/global.d.ts @@ -4,12 +4,19 @@ declare const __SENTRY_DSN__: string declare const __ALGOLIA_APP_ID__: string declare const __ALGOLIA_API_KEY__: string declare const __USE_PROD_CONFIG__: boolean -declare const __MIXPANEL_TOKEN__: string -type BuildFeatureFlags = { - REQUIRE_SUBSCRIPTION: boolean +interface Window { + __CONFIG__: { + mixpanel_token?: string + subscription_required?: boolean + server_health_alert?: { + message: string + tooltip?: string + severity?: 'info' | 'warning' | 'error' + badge?: string + } + } } -declare const __BUILD_FLAGS__: BuildFeatureFlags interface Navigator { /** diff --git a/src/components/actionbar/ComfyRunButton/index.ts b/src/components/actionbar/ComfyRunButton/index.ts index 4d15d44ee..1ee49963e 100644 --- a/src/components/actionbar/ComfyRunButton/index.ts +++ b/src/components/actionbar/ComfyRunButton/index.ts @@ -2,6 +2,6 @@ import { defineAsyncComponent } from 'vue' import { isCloud } from '@/platform/distribution/types' -export default isCloud && __BUILD_FLAGS__.REQUIRE_SUBSCRIPTION +export default isCloud && window.__CONFIG__?.subscription_required ? defineAsyncComponent(() => import('./CloudRunButtonWrapper.vue')) : defineAsyncComponent(() => import('./ComfyQueueButton.vue')) diff --git a/src/components/graph/GraphCanvas.vue b/src/components/graph/GraphCanvas.vue index ea052d34a..90d2b30b9 100644 --- a/src/components/graph/GraphCanvas.vue +++ b/src/components/graph/GraphCanvas.vue @@ -12,7 +12,7 @@ v-if="isNativeWindow() && workflowTabsPosition !== 'Topbar'" class="app-drag fixed top-0 left-0 z-10 h-[var(--comfy-topbar-height)] w-full" /> -