[API Node] Better execution error handling (#3587)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
Chenlei Hu
2025-04-23 11:15:38 -04:00
committed by GitHub
parent 9e10e55633
commit 4c23cfbd4d
11 changed files with 14 additions and 159 deletions

View File

@@ -12,7 +12,7 @@
<ApiNodesList :node-names="apiNodeNames" />
<div class="flex justify-between items-center">
<Button :label="t('g.learnMore')" link />
<Button :label="t('g.learnMore')" link @click="handleLearnMoreClick" />
<div class="flex gap-2">
<Button
:label="t('g.cancel')"
@@ -37,4 +37,8 @@ const { apiNodeNames, onLogin, onCancel } = defineProps<{
onLogin?: () => void
onCancel?: () => void
}>()
const handleLearnMoreClick = () => {
window.open('https://www.comfy.org/faq', '_blank')
}
</script>

View File

@@ -1,47 +0,0 @@
<template>
<div class="flex flex-col items-center gap-4 p-4">
<div class="flex flex-col items-center text-center">
<i class="pi pi-exclamation-circle mb-4" style="font-size: 2rem" />
<h2 class="text-2xl font-semibold mb-2">
{{ $t(`auth.required.${type}.title`) }}
</h2>
<p class="text-gray-600 mb-4 max-w-md">
{{ $t(`auth.required.${type}.message`) }}
</p>
</div>
<div class="flex gap-4">
<Button
class="w-60"
severity="primary"
:label="$t(`auth.required.${type}.action`)"
@click="openPanel"
/>
</div>
</div>
</template>
<script setup lang="ts">
import Button from 'primevue/button'
import { useDialogStore } from '@/stores/dialogStore'
import { useFirebaseAuthStore } from '@/stores/firebaseAuthStore'
const props = defineProps<{
type: 'signIn' | 'credits'
}>()
const dialogStore = useDialogStore()
const authStore = useFirebaseAuthStore()
const openPanel = () => {
// Close the current dialog
dialogStore.closeDialog({ key: 'signin-required' })
// Open user settings and navigate to appropriate panel
if (props.type === 'credits') {
authStore.openCreditsPanel()
} else {
authStore.openSignInPanel()
}
}
</script>