mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-07 08:30:06 +00:00
[API Node] Better execution error handling (#3587)
Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user