Skip to content

Commit e827138

Browse files
arjansinghMyesteryviva-jinyiclaudechristian-byrne
authored
feat(frontend): update cloud branch 2025-10-16 (#6096)
## Summary Updates with cloud specific features merged into `main`. Notable changes include the `DISTRIBUTION=cloud` changes. Will also be changing cloud build workflow to build with that flag in Comfy-Org/cloud#1043 ## Changes - bb61d98 feat: AssetCard tweaks (#6085) - 05f7352 fix terminal style (#6056) - d5fa221 Add distribution detection pattern (#6028) - 6c36aaa feat: Improve MediaAssetCard video controls and add gallery view (#6065) - 6944ef0 fix Cloudbadge (#6063) - 6764f8d Badge for cloud environment (#6048) --------- Co-authored-by: Johnpaul Chiwetelu <[email protected]> Co-authored-by: Jin Yi <[email protected]> Co-authored-by: Claude <[email protected]> Co-authored-by: Christian Byrne <[email protected]>
1 parent 31eb9ea commit e827138

File tree

26 files changed

+609
-97
lines changed

26 files changed

+609
-97
lines changed

packages/design-system/src/css/style.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,10 @@
8585
--color-bypass: #6a246a;
8686
--color-error: #962a2a;
8787

88+
--color-comfy-menu-secondary: var(--comfy-menu-secondary-bg);
89+
--text-xxxs: 0.5625rem;
90+
--text-xxxs--line-height: calc(1 / 0.5625);
91+
8892
--color-blue-selection: rgb(from var(--color-blue-100) r g b / 0.3);
8993
--color-node-hover-100: rgb(from var(--color-charcoal-100) r g b/ 0.15);
9094
--color-node-hover-200: rgb(from var(--color-charcoal-100) r g b/ 0.1);

src/components/helpcenter/HelpCenterMenuContent.vue

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ import type { CSSProperties, Component } from 'vue'
135135
import { useI18n } from 'vue-i18n'
136136
137137
import PuzzleIcon from '@/components/icons/PuzzleIcon.vue'
138+
import { isCloud } from '@/platform/distribution/types'
138139
import { useSettingStore } from '@/platform/settings/settingStore'
139140
import type { ReleaseNote } from '@/platform/updates/common/releaseService'
140141
import { useReleaseStore } from '@/platform/updates/common/releaseStore'
@@ -265,7 +266,7 @@ const moreMenuItem = computed(() =>
265266
)
266267
267268
const menuItems = computed<MenuItem[]>(() => {
268-
return [
269+
const items: MenuItem[] = [
269270
{
270271
key: 'docs',
271272
type: 'item',
@@ -305,8 +306,12 @@ const menuItems = computed<MenuItem[]>(() => {
305306
void commandStore.execute('Comfy.ContactSupport')
306307
emit('close')
307308
}
308-
},
309-
{
309+
}
310+
]
311+
312+
// Extension manager - only in non-cloud distributions
313+
if (!isCloud) {
314+
items.push({
310315
key: 'manager',
311316
type: 'item',
312317
icon: PuzzleIcon,
@@ -319,17 +324,20 @@ const menuItems = computed<MenuItem[]>(() => {
319324
})
320325
emit('close')
321326
}
322-
},
323-
{
324-
key: 'more',
325-
type: 'item',
326-
icon: '',
327-
label: t('helpCenter.more'),
328-
visible: hasVisibleMoreItems.value,
329-
action: () => {}, // No action for more item
330-
items: moreItems.value
331-
}
332-
]
327+
})
328+
}
329+
330+
items.push({
331+
key: 'more',
332+
type: 'item',
333+
icon: '',
334+
label: t('helpCenter.more'),
335+
visible: hasVisibleMoreItems.value,
336+
action: () => {}, // No action for more item
337+
items: moreItems.value
338+
})
339+
340+
return items
333341
})
334342
335343
// Utility Functions
@@ -420,6 +428,9 @@ const formatReleaseDate = (dateString?: string): string => {
420428
}
421429
422430
const shouldShowUpdateButton = (release: ReleaseNote): boolean => {
431+
// Hide update buttons in cloud distribution
432+
if (isCloud) return false
433+
423434
return (
424435
releaseStore.shouldShowUpdateButton &&
425436
release === releaseStore.recentReleases[0]

src/components/topbar/TopMenubar.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22
<div>
33
<div
44
v-show="showTopMenu && workflowTabsPosition === 'Topbar'"
5-
class="z-1001 flex h-[38px] w-full content-end"
5+
class="z-1001 flex h-9.5 w-full content-end"
66
style="background: var(--border-color)"
77
>
88
<WorkflowTabs />
9+
<TopbarBadges />
910
</div>
1011
<div
1112
v-show="showTopMenu"
1213
ref="topMenuRef"
13-
class="comfyui-menu flex items-center"
14+
class="comfyui-menu flex items-center bg-gray-100"
1415
:class="{ dropzone: isDropZone, 'dropzone-active': isDroppable }"
1516
>
1617
<CommandMenubar />
@@ -44,9 +45,10 @@ import { app } from '@/scripts/app'
4445
import { useWorkspaceStore } from '@/stores/workspaceStore'
4546
import { electronAPI, isElectron, isNativeWindow } from '@/utils/envUtil'
4647
48+
import TopbarBadges from './TopbarBadges.vue'
49+
4750
const workspaceState = useWorkspaceStore()
4851
const settingStore = useSettingStore()
49-
5052
const menuSetting = computed(() => settingStore.get('Comfy.UseNewMenu'))
5153
const betaMenuEnabled = computed(() => menuSetting.value !== 'Disabled')
5254
const showTopMenu = computed(
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<template>
2+
<div class="flex items-center gap-2 bg-comfy-menu-secondary px-3">
3+
<div
4+
v-if="badge.label"
5+
class="rounded-full bg-white px-1.5 py-0.5 text-xxxs font-semibold text-black"
6+
>
7+
{{ badge.label }}
8+
</div>
9+
<div class="font-inter text-sm font-extrabold text-slate-100">
10+
{{ badge.text }}
11+
</div>
12+
</div>
13+
</template>
14+
<script setup lang="ts">
15+
import type { TopbarBadge } from '@/types/comfy'
16+
17+
defineProps<{
18+
badge: TopbarBadge
19+
}>()
20+
</script>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<template>
2+
<div class="flex">
3+
<TopbarBadge
4+
v-for="badge in topbarBadgeStore.badges"
5+
:key="badge.text"
6+
:badge
7+
/>
8+
</div>
9+
</template>
10+
11+
<script lang="ts" setup>
12+
import { useTopbarBadgeStore } from '@/stores/topbarBadgeStore'
13+
14+
import TopbarBadge from './TopbarBadge.vue'
15+
16+
const topbarBadgeStore = useTopbarBadgeStore()
17+
</script>

src/composables/bottomPanelTabs/useTerminal.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,14 @@ import { debounce } from 'es-toolkit/compat'
55
import type { Ref } from 'vue'
66
import { markRaw, onMounted, onUnmounted } from 'vue'
77

8+
import { isDesktop } from '@/platform/distribution/types'
9+
810
export function useTerminal(element: Ref<HTMLElement | undefined>) {
911
const fitAddon = new FitAddon()
1012
const terminal = markRaw(
1113
new Terminal({
1214
convertEol: true,
13-
theme: { background: '#171717' }
15+
theme: isDesktop ? { background: '#171717' } : undefined
1416
})
1517
)
1618
terminal.loadAddon(fitAddon)

src/extensions/core/cloudBadge.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import { t } from '@/i18n'
2+
import { isCloud } from '@/platform/distribution/types'
3+
import { useExtensionService } from '@/services/extensionService'
4+
5+
useExtensionService().registerExtension({
6+
name: 'Comfy.CloudBadge',
7+
// Only show badge when running in cloud environment
8+
topbarBadges: isCloud
9+
? [
10+
{
11+
label: t('g.beta'),
12+
text: 'Comfy Cloud'
13+
}
14+
]
15+
: undefined
16+
})

src/extensions/core/index.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { isCloud } from '@/platform/distribution/types'
2+
13
import './clipspace'
24
import './contextMenuFilter'
35
import './dynamicPrompts'
@@ -21,3 +23,7 @@ import './uploadAudio'
2123
import './uploadImage'
2224
import './webcamCapture'
2325
import './widgetInputs'
26+
27+
if (isCloud) {
28+
import('./cloudBadge')
29+
}

src/locales/en/main.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@
197197
"volume": "Volume",
198198
"halfSpeed": "0.5x",
199199
"1x": "1x",
200-
"2x": "2x"
200+
"2x": "2x",
201+
"beta": "BETA"
201202
},
202203
"manager": {
203204
"title": "Custom Nodes Manager",

src/platform/assets/components/AssetCard.stories.ts

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,51 @@ export const NonInteractive: Story = {
8484
}
8585
}
8686

87+
export const WithPreviewImage: Story = {
88+
args: {
89+
asset: createAssetData({
90+
preview_url: '/assets/images/comfy-logo-single.svg'
91+
}),
92+
interactive: true
93+
},
94+
decorators: [
95+
() => ({
96+
template:
97+
'<div class="p-8 bg-gray-50 dark-theme:bg-gray-900 max-w-96"><story /></div>'
98+
})
99+
],
100+
parameters: {
101+
docs: {
102+
description: {
103+
story: 'AssetCard with a preview image displayed.'
104+
}
105+
}
106+
}
107+
}
108+
109+
export const FallbackGradient: Story = {
110+
args: {
111+
asset: createAssetData({
112+
preview_url: undefined
113+
}),
114+
interactive: true
115+
},
116+
decorators: [
117+
() => ({
118+
template:
119+
'<div class="p-8 bg-gray-50 dark-theme:bg-gray-900 max-w-96"><story /></div>'
120+
})
121+
],
122+
parameters: {
123+
docs: {
124+
description: {
125+
story:
126+
'AssetCard showing fallback gradient when no preview image is available.'
127+
}
128+
}
129+
}
130+
}
131+
87132
export const EdgeCases: Story = {
88133
render: () => ({
89134
components: { AssetCard },

0 commit comments

Comments
 (0)