mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-06 08:00:05 +00:00
await command executions
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
icon="pi pi-expand"
|
||||
v-tooltip.left="t('graphCanvasMenu.fitView')"
|
||||
:aria-label="$t('graphCanvasMenu.fitView')"
|
||||
@click="() => commandStore.execute('Comfy.Canvas.FitView')"
|
||||
@click="async () => await commandStore.execute('Comfy.Canvas.FitView')"
|
||||
/>
|
||||
<Button
|
||||
severity="secondary"
|
||||
@@ -39,7 +39,7 @@
|
||||
(canvasStore.canvas?.read_only ? 'panMode' : 'selectMode')
|
||||
)
|
||||
"
|
||||
@click="() => commandStore.execute('Comfy.Canvas.ToggleLock')"
|
||||
@click="async () => await commandStore.execute('Comfy.Canvas.ToggleLock')"
|
||||
>
|
||||
<template #icon>
|
||||
<i-material-symbols:pan-tool-outline
|
||||
@@ -53,7 +53,10 @@
|
||||
:icon="linkHidden ? 'pi pi-eye-slash' : 'pi pi-eye'"
|
||||
v-tooltip.left="t('graphCanvasMenu.toggleLinkVisibility')"
|
||||
:aria-label="$t('graphCanvasMenu.toggleLinkVisibility')"
|
||||
@click="() => commandStore.execute('Comfy.Canvas.ToggleLinkVisibility')"
|
||||
@click="
|
||||
async () =>
|
||||
await commandStore.execute('Comfy.Canvas.ToggleLinkVisibility')
|
||||
"
|
||||
data-testid="toggle-link-visibility-button"
|
||||
/>
|
||||
</ButtonGroup>
|
||||
|
||||
@@ -12,7 +12,8 @@
|
||||
severity="secondary"
|
||||
text
|
||||
@click="
|
||||
() => commandStore.execute('Comfy.Canvas.ToggleSelectedNodes.Bypass')
|
||||
async () =>
|
||||
await commandStore.execute('Comfy.Canvas.ToggleSelectedNodes.Bypass')
|
||||
"
|
||||
data-testid="bypass-button"
|
||||
v-tooltip.top="{
|
||||
@@ -29,7 +30,10 @@
|
||||
severity="secondary"
|
||||
text
|
||||
icon="pi pi-thumbtack"
|
||||
@click="() => commandStore.execute('Comfy.Canvas.ToggleSelected.Pin')"
|
||||
@click="
|
||||
async () =>
|
||||
await commandStore.execute('Comfy.Canvas.ToggleSelected.Pin')
|
||||
"
|
||||
v-tooltip.top="{
|
||||
value: t('commands.Comfy_Canvas_ToggleSelectedNodes_Pin.label'),
|
||||
showDelay: 1000
|
||||
@@ -39,7 +43,10 @@
|
||||
severity="danger"
|
||||
text
|
||||
icon="pi pi-trash"
|
||||
@click="() => commandStore.execute('Comfy.Canvas.DeleteSelectedItems')"
|
||||
@click="
|
||||
async () =>
|
||||
await commandStore.execute('Comfy.Canvas.DeleteSelectedItems')
|
||||
"
|
||||
v-tooltip.top="{
|
||||
value: t('commands.Comfy_Canvas_DeleteSelectedItems.label'),
|
||||
showDelay: 1000
|
||||
|
||||
@@ -23,7 +23,7 @@ const icon = computed(() =>
|
||||
)
|
||||
|
||||
const commandStore = useCommandStore()
|
||||
const toggleTheme = () => {
|
||||
commandStore.execute('Comfy.ToggleTheme')
|
||||
const toggleTheme = async () => {
|
||||
await commandStore.execute('Comfy.ToggleTheme')
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -36,7 +36,9 @@
|
||||
icon="pi pi-stop"
|
||||
severity="danger"
|
||||
text
|
||||
@click="() => commandStore.execute('Comfy.ClearPendingTasks')"
|
||||
@click="
|
||||
async () => await commandStore.execute('Comfy.ClearPendingTasks')
|
||||
"
|
||||
v-tooltip.bottom="$t('sideToolbar.queueTab.clearPendingTasks')"
|
||||
/>
|
||||
<Button
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
text
|
||||
severity="secondary"
|
||||
:aria-label="$t('sideToolbar.newBlankWorkflow')"
|
||||
@click="() => commandStore.execute('Comfy.NewBlankWorkflow')"
|
||||
@click="async () => await commandStore.execute('Comfy.NewBlankWorkflow')"
|
||||
/>
|
||||
<ContextMenu ref="menu" :model="contextMenuItems" />
|
||||
</div>
|
||||
|
||||
@@ -44,7 +44,7 @@ export const useRefreshableSelection = () => {
|
||||
if (!isRefreshable.value) return
|
||||
|
||||
if (isAllNodesSelected.value) {
|
||||
commandStore.execute('Comfy.RefreshNodeDefinitions')
|
||||
await commandStore.execute('Comfy.RefreshNodeDefinitions')
|
||||
} else {
|
||||
await Promise.all(refreshableWidgets.value.map((item) => item.refresh()))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user