Skip to content

Commit

Permalink
Remove new default workflow button in workflows sidebar (#1100)
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei authored Oct 4, 2024
1 parent e20126a commit 39d68bc
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 20 deletions.
8 changes: 2 additions & 6 deletions browser_tests/ComfyPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,12 +192,8 @@ class WorkflowsSidebarTab extends SidebarTab {
return this.page.locator('.new-blank-workflow-button')
}

get browseWorkflowsButton() {
return this.page.locator('.browse-workflows-button')
}

get newDefaultWorkflowButton() {
return this.page.locator('.new-default-workflow-button')
get openWorkflowButton() {
return this.page.locator('.open-workflow-button')
}

async getOpenedWorkflowNames() {
Expand Down
4 changes: 2 additions & 2 deletions browser_tests/menu.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -426,9 +426,9 @@ test.describe('Menu', () => {
await comfyPage.loadWorkflow('missing_nodes')
await comfyPage.closeDialog()

// Load default workflow
// Load blank workflow
await comfyPage.menu.workflowsTab.open()
await comfyPage.menu.workflowsTab.newDefaultWorkflowButton.click()
await comfyPage.menu.workflowsTab.newBlankWorkflowButton.click()

// Switch back to the missing_nodes workflow
await comfyPage.menu.workflowsTab.switchToWorkflow('missing_nodes')
Expand Down
15 changes: 3 additions & 12 deletions src/components/sidebar/tabs/WorkflowsSidebarTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,16 @@
"
/>
<Button
class="browse-workflows-button"
class="open-workflow-button"
icon="pi pi-folder-open"
v-tooltip="'Browse for an image or exported workflow'"
v-tooltip="$t('sideToolbar.openWorkflow')"
text
@click="() => commandStore.getCommandFunction('Comfy.OpenWorkflow')()"
/>
<Button
class="new-default-workflow-button"
icon="pi pi-code"
v-tooltip="'Load default workflow'"
text
@click="
() => commandStore.getCommandFunction('Comfy.LoadDefaultWorkflow')()
"
/>
<Button
class="new-blank-workflow-button"
icon="pi pi-plus"
v-tooltip="'Create a new blank workflow'"
v-tooltip="$t('sideToolbar.newBlankWorkflow')"
@click="
() => commandStore.getCommandFunction('Comfy.NewBlankWorkflow')()
"
Expand Down
4 changes: 4 additions & 0 deletions src/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ const messages = {
nodeLibrary: 'Node Library',
workflows: 'Workflows',
browseTemplates: 'Browse example templates',
openWorkflow: 'Open workflow in local file system',
newBlankWorkflow: 'Create a new blank workflow',
nodeLibraryTab: {
sortOrder: 'Sort Order'
},
Expand Down Expand Up @@ -159,6 +161,8 @@ const messages = {
nodeLibrary: '节点库',
workflows: '工作流',
browseTemplates: '浏览示例模板',
openWorkflow: '在本地文件系统中打开工作流',
newBlankWorkflow: '创建一个新空白工作流',
nodeLibraryTab: {
sortOrder: '排序顺序'
},
Expand Down

0 comments on commit 39d68bc

Please sign in to comment.