mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-03-08 14:39:58 +00:00
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:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user