Add context menu to tabs (#1759)

* Add context menu to tabs

* Flatten menu
Translate

* Add translations

---------

Co-authored-by: huchenlei <huchenlei@proton.me>
This commit is contained in:
pythongosssss
2024-12-02 18:19:39 +00:00
committed by GitHub
parent 1afc584393
commit 17b7ef18d6
6 changed files with 134 additions and 30 deletions

View File

@@ -300,5 +300,13 @@ export const workflowService = {
if (previousWorkflow) {
await this.openWorkflow(previousWorkflow)
}
},
/**
* Takes an existing workflow and duplicates it with a new name
*/
async duplicateWorkflow(workflow: ComfyWorkflow) {
const state = JSON.parse(JSON.stringify(workflow.activeState))
await app.loadGraphData(state, true, true, workflow.filename)
}
}