Skip to content

Commit b5c1da2

Browse files
authored
[API Nodes] Remove cost from signin required dialog (#3532)
1 parent 0006dd3 commit b5c1da2

File tree

3 files changed

+36
-9
lines changed

3 files changed

+36
-9
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<template>
2+
<div class="flex flex-col gap-3 h-full">
3+
<div class="flex text-xs">
4+
<div>{{ t('apiNodesCostBreakdown.title') }}</div>
5+
</div>
6+
<ScrollPanel class="flex-grow h-0">
7+
<div class="flex flex-col gap-2">
8+
<div
9+
v-for="nodeName in nodeNames"
10+
:key="nodeName"
11+
class="flex items-center justify-between px-3 py-2 rounded-md bg-[var(--p-content-border-color)]"
12+
>
13+
<div class="flex items-center gap-2">
14+
<span class="text-base font-medium leading-tight">{{
15+
nodeName
16+
}}</span>
17+
</div>
18+
</div>
19+
</div>
20+
</ScrollPanel>
21+
</div>
22+
</template>
23+
24+
<script setup lang="ts">
25+
import ScrollPanel from 'primevue/scrollpanel'
26+
import { useI18n } from 'vue-i18n'
27+
28+
const { t } = useI18n()
29+
30+
const { nodeNames } = defineProps<{ nodeNames: string[] }>()
31+
</script>

src/components/dialog/content/ApiNodesSignInContent.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
{{ t('apiNodesSignInDialog.message') }}
1010
</div>
1111

12-
<ApiNodesCostBreakdown :nodes="apiNodes" :show-total="true" />
12+
<ApiNodesList :node-names="apiNodeNames" />
1313

1414
<div class="flex justify-between items-center">
1515
<Button :label="t('g.learnMore')" link />
@@ -30,13 +30,10 @@
3030
import Button from 'primevue/button'
3131
import { useI18n } from 'vue-i18n'
3232
33-
import ApiNodesCostBreakdown from '@/components/common/ApiNodesCostBreakdown.vue'
34-
import type { ApiNodeCost } from '@/types/apiNodeTypes'
35-
3633
const { t } = useI18n()
3734
38-
const { apiNodes, onLogin, onCancel } = defineProps<{
39-
apiNodes: ApiNodeCost[]
35+
const { apiNodeNames, onLogin, onCancel } = defineProps<{
36+
apiNodeNames: string[]
4037
onLogin?: () => void
4138
onCancel?: () => void
4239
}>()

src/services/dialogService.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import TemplateWorkflowsDialogHeader from '@/components/templates/TemplateWorkfl
1919
import { t } from '@/i18n'
2020
import type { ExecutionErrorWsMessage } from '@/schemas/apiSchema'
2121
import { type ShowDialogOptions, useDialogStore } from '@/stores/dialogStore'
22-
import { ApiNodeCost } from '@/types/apiNodeTypes'
2322
import { ManagerTab } from '@/types/comfyManagerTypes'
2423

2524
export type ConfirmationDialogType =
@@ -225,14 +224,14 @@ export const useDialogService = () => {
225224
* @returns Promise that resolves to true if user clicks login, false if cancelled
226225
*/
227226
async function showApiNodesSignInDialog(
228-
apiNodes: ApiNodeCost[]
227+
apiNodeNames: string[]
229228
): Promise<boolean> {
230229
return new Promise<boolean>((resolve) => {
231230
dialogStore.showDialog({
232231
key: 'api-nodes-signin',
233232
component: ApiNodesSignInContent,
234233
props: {
235-
apiNodes,
234+
apiNodeNames,
236235
onLogin: () => showSignInDialog().then((result) => resolve(result)),
237236
onCancel: () => resolve(false)
238237
},

0 commit comments

Comments
 (0)