Line data Source code
1 : import { getComfyPlatformBaseUrl } from '@/config/comfyApi'
2 : import { t } from '@/i18n'
3 : import { CUSTOM_DEPLOYMENT_BRIEF } from '@/platform/workspace/customDeploymentBrief'
4 :
5 : /** One line of what a workflow lacks: how many of a kind, then their names. */
6 : export interface MissingItemsRow {
7 : label: string
8 : names: string
9 : }
10 :
11 : /** The copy a custom deployment dialog shows. */
12 : export interface CustomDeploymentPitch {
13 : title: string
14 : body: string
15 : points: readonly string[]
16 : platformLabel: string
17 : brief: string
18 : missing?: readonly MissingItemsRow[]
19 : note?: string
20 : }
21 :
22 : /** Platform's Deploy page at its Builds, where a custom deployment starts. */
23 0 : export function customDeploymentCreateUrl(): string {
24 0 : return `${getComfyPlatformBaseUrl()}/profile/builds`
25 : }
26 :
27 : /** The pitch Run on's Create a custom deployment item shows. */
28 0 : export function customDeploymentPitch(): CustomDeploymentPitch {
29 0 : return {
30 : title: t('deploymentSwitcher.customDeployment.title'),
31 : body: t('deploymentSwitcher.customDeployment.body'),
32 : points: [
33 : t('deploymentSwitcher.customDeployment.pointNodes'),
34 : t('deploymentSwitcher.customDeployment.pointGpu'),
35 : t('deploymentSwitcher.customDeployment.pointApi')
36 : ],
37 : platformLabel: t('deploymentSwitcher.customDeployment.createOnPlatform'),
38 : brief: CUSTOM_DEPLOYMENT_BRIEF
39 : }
40 : }
|