Add default toast error handling for command execution (#1106)

* Error handling execute command

* Cleanup

* Add playwright test

* Mock i18n in jest test

* Reduce test func timeout
This commit is contained in:
Chenlei Hu
2024-10-04 16:28:08 -04:00
committed by GitHub
parent ebc71b0e46
commit 57a4cb9036
13 changed files with 126 additions and 44 deletions

View File

@@ -36,9 +36,7 @@
icon="pi pi-stop"
severity="danger"
text
@click="
() => commandStore.getCommandFunction('Comfy.ClearPendingTasks')()
"
@click="() => commandStore.execute('Comfy.ClearPendingTasks')"
v-tooltip.bottom="$t('sideToolbar.queueTab.clearPendingTasks')"
/>
<Button

View File

@@ -6,24 +6,20 @@
icon="pi pi-th-large"
v-tooltip="$t('sideToolbar.browseTemplates')"
text
@click="
() => commandStore.getCommandFunction('Comfy.BrowseTemplates')()
"
@click="() => commandStore.execute('Comfy.BrowseTemplates')"
/>
<Button
class="open-workflow-button"
icon="pi pi-folder-open"
v-tooltip="$t('sideToolbar.openWorkflow')"
text
@click="() => commandStore.getCommandFunction('Comfy.OpenWorkflow')()"
@click="() => commandStore.execute('Comfy.OpenWorkflow')"
/>
<Button
class="new-blank-workflow-button"
icon="pi pi-plus"
v-tooltip="$t('sideToolbar.newBlankWorkflow')"
@click="
() => commandStore.getCommandFunction('Comfy.NewBlankWorkflow')()
"
@click="() => commandStore.execute('Comfy.NewBlankWorkflow')"
text
/>
</template>