Line data Source code
1 : import { useDialogStore } from '@/stores/dialogStore'
2 : import {
3 : DEPLOY_VIDEO_POSTER_SRC,
4 : DEPLOY_VIDEO_SOURCES
5 : } from '@/platform/workflow/deploy/constants'
6 : import { openCardDialog } from '@/platform/workspace/openCustomDeploymentDialog'
7 :
8 2355 : const RUN_ON_CLOUD_DIALOG_KEY = 'global-run-on-comfy-cloud'
9 :
10 0 : export function closeRunOnCloudDialog(): boolean {
11 0 : const dialogStore = useDialogStore()
12 0 : if (!dialogStore.isDialogOpen(RUN_ON_CLOUD_DIALOG_KEY)) return false
13 0 : dialogStore.closeDialog({ key: RUN_ON_CLOUD_DIALOG_KEY })
14 0 : return true
15 : }
16 :
17 0 : export function openRunOnCloudDialog(
18 : isStillWanted: () => boolean
19 : ): Promise<boolean> {
20 0 : return openCardDialog(
21 : RUN_ON_CLOUD_DIALOG_KEY,
22 : () => import('@/platform/openOnCloud/components/RunOnCloudDialog.vue'),
23 : {},
24 : isStillWanted
25 : )
26 : }
27 :
28 0 : export function openDeploySetupDialog(): Promise<boolean> {
29 0 : return openCardDialog(
30 : RUN_ON_CLOUD_DIALOG_KEY,
31 : () => import('@/platform/openOnCloud/components/DeploySetupCard.vue'),
32 : { videoSources: DEPLOY_VIDEO_SOURCES, posterSrc: DEPLOY_VIDEO_POSTER_SRC }
33 : )
34 : }
|