mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-22 23:39:45 +00:00
Allow extension register custom topbar menu command (#982)
* Refactor command store * Rename coreMenuStore to menuStore * Extension API to register command * Update README * Add playwright test
This commit is contained in:
@@ -36,7 +36,9 @@
|
||||
icon="pi pi-stop"
|
||||
severity="danger"
|
||||
text
|
||||
@click="() => commandStore.getCommand('Comfy.ClearPendingTasks')()"
|
||||
@click="
|
||||
() => commandStore.getCommandFunction('Comfy.ClearPendingTasks')()
|
||||
"
|
||||
v-tooltip.bottom="$t('sideToolbar.queueTab.clearPendingTasks')"
|
||||
/>
|
||||
<Button
|
||||
|
||||
@@ -6,27 +6,33 @@
|
||||
icon="pi pi-th-large"
|
||||
v-tooltip="$t('sideToolbar.browseTemplates')"
|
||||
text
|
||||
@click="() => commandStore.getCommand('Comfy.BrowseTemplates')()"
|
||||
@click="
|
||||
() => commandStore.getCommandFunction('Comfy.BrowseTemplates')()
|
||||
"
|
||||
/>
|
||||
<Button
|
||||
class="browse-workflows-button"
|
||||
icon="pi pi-folder-open"
|
||||
v-tooltip="'Browse for an image or exported workflow'"
|
||||
text
|
||||
@click="() => commandStore.getCommand('Comfy.OpenWorkflow')()"
|
||||
@click="() => commandStore.getCommandFunction('Comfy.OpenWorkflow')()"
|
||||
/>
|
||||
<Button
|
||||
class="new-default-workflow-button"
|
||||
icon="pi pi-code"
|
||||
v-tooltip="'Load default workflow'"
|
||||
text
|
||||
@click="() => commandStore.getCommand('Comfy.LoadDefaultWorkflow')()"
|
||||
@click="
|
||||
() => commandStore.getCommandFunction('Comfy.LoadDefaultWorkflow')()
|
||||
"
|
||||
/>
|
||||
<Button
|
||||
class="new-blank-workflow-button"
|
||||
icon="pi pi-plus"
|
||||
v-tooltip="'Create a new blank workflow'"
|
||||
@click="() => commandStore.getCommand('Comfy.NewBlankWorkflow')()"
|
||||
@click="
|
||||
() => commandStore.getCommandFunction('Comfy.NewBlankWorkflow')()
|
||||
"
|
||||
text
|
||||
/>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user