Skip to content

Commit fceb62d

Browse files
committed
refactor: cloud prefix removed & apply code review
1 parent a0dce0e commit fceb62d

File tree

5 files changed

+12
-18
lines changed

5 files changed

+12
-18
lines changed

src/components/button/IconTextButton.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ defineOptions({
3232
interface IconTextButtonProps extends BaseButtonProps {
3333
iconPosition?: 'left' | 'right'
3434
label: string
35-
onClick: () => void
35+
onClick?: () => void
3636
}
3737
3838
const {

src/components/dialog/content/MissingCoreNodesMessage.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ import { computed } from 'vue'
4949
import type { LGraphNode } from '@/lib/litegraph/src/litegraph'
5050
import { useSystemStatsStore } from '@/stores/systemStatsStore'
5151
52-
const props = defineProps<{
52+
const { missingCoreNodes } = defineProps<{
5353
missingCoreNodes: Record<string, LGraphNode[]>
5454
}>()
5555
5656
const systemStatsStore = useSystemStatsStore()
5757
5858
const hasMissingCoreNodes = computed(() => {
59-
return Object.keys(props.missingCoreNodes).length > 0
59+
return Object.keys(missingCoreNodes).length > 0
6060
})
6161
6262
// Use computed for reactive version tracking
@@ -66,7 +66,7 @@ const currentComfyUIVersion = computed<string | null>(() => {
6666
})
6767
6868
const sortedMissingCoreNodes = computed(() => {
69-
return Object.entries(props.missingCoreNodes).sort(([a], [b]) => {
69+
return Object.entries(missingCoreNodes).sort(([a], [b]) => {
7070
// Sort by version in descending order (newest first)
7171
return compare(b, a) // Reversed for descending order
7272
})

src/components/dialog/content/MissingNodesContent.vue

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,7 @@
1313
}}
1414
</p>
1515
</div>
16-
<MissingCoreNodesMessage
17-
v-if="!isCloud"
18-
:missing-core-nodes="missingCoreNodes"
19-
/>
16+
<MissingCoreNodesMessage v-if="!isCloud" :missing-core-nodes />
2017

2118
<!-- Missing Nodes List Wrapper -->
2219
<div

src/components/dialog/content/MissingNodesFooter.vue

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@
99
type="transparent"
1010
size="sm"
1111
icon-position="left"
12-
@click="handleLearnMoreClick"
12+
as="a"
13+
href="https://www.comfy.org/cloud"
14+
target="_blank"
15+
rel="noopener noreferrer"
1316
>
1417
<template #icon>
1518
<i class="icon-[lucide--info]"></i>
@@ -67,16 +70,10 @@ import { ManagerTab } from '@/workbench/extensions/manager/types/comfyManagerTyp
6770
const dialogStore = useDialogStore()
6871
const { t } = useI18n()
6972
70-
// Cloud mode handlers
71-
const handleLearnMoreClick = () => {
72-
window.open('https://www.comfy.org/cloud', '_blank')
73-
}
74-
7573
const handleGotItClick = () => {
76-
dialogStore.closeDialog({ key: 'global-cloud-missing-nodes' })
74+
dialogStore.closeDialog({ key: 'global-missing-nodes' })
7775
}
7876
79-
// OSS mode logic
8077
const { missingNodePacks, isLoading, error } = useMissingNodes()
8178
const comfyManagerStore = useComfyManagerStore()
8279
const managerState = useManagerState()
@@ -121,7 +118,7 @@ watch(allMissingNodesInstalled, async (allInstalled) => {
121118
// Use nextTick to ensure state updates are complete
122119
await nextTick()
123120
124-
dialogStore.closeDialog({ key: 'global-cloud-missing-nodes' })
121+
dialogStore.closeDialog({ key: 'global-missing-nodes' })
125122
126123
// Show success toast
127124
useToastStore().add({

src/services/dialogService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export const useDialogService = () => {
5151
props: ComponentProps<typeof MissingNodesContent>
5252
) {
5353
dialogStore.showDialog({
54-
key: 'global-cloud-missing-nodes',
54+
key: 'global-missing-nodes',
5555
headerComponent: MissingNodesHeader,
5656
footerComponent: MissingNodesFooter,
5757
component: MissingNodesContent,

0 commit comments

Comments
 (0)