File tree Expand file tree Collapse file tree 1 file changed +24
-3
lines changed
src/components/breadcrumb Expand file tree Collapse file tree 1 file changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,7 @@ const rename = async (
107107 }
108108}
109109
110+ const isRoot = props .item .key === ' root'
110111const menuItems = computed <MenuItem []>(() => {
111112 return [
112113 {
@@ -120,7 +121,27 @@ const menuItems = computed<MenuItem[]>(() => {
120121 command : async () => {
121122 await workflowService .duplicateWorkflow (workflowStore .activeWorkflow ! )
122123 },
123- visible: props .item .key === ' root'
124+ visible: isRoot
125+ },
126+ {
127+ separator: true ,
128+ visible: isRoot
129+ },
130+ {
131+ label: t (' menuLabels.Save' ),
132+ icon: ' pi pi-save' ,
133+ command : async () => {
134+ await useCommandStore ().execute (' Comfy.SaveWorkflow' )
135+ },
136+ visible: isRoot
137+ },
138+ {
139+ label: t (' menuLabels.Save As' ),
140+ icon: ' pi pi-save' ,
141+ command : async () => {
142+ await useCommandStore ().execute (' Comfy.SaveWorkflowAs' )
143+ },
144+ visible: isRoot
124145 },
125146 {
126147 separator: true
@@ -134,15 +155,15 @@ const menuItems = computed<MenuItem[]>(() => {
134155 },
135156 {
136157 separator: true ,
137- visible: props . item . key === ' root '
158+ visible: isRoot
138159 },
139160 {
140161 label: t (' breadcrumbsMenu.deleteWorkflow' ),
141162 icon: ' pi pi-times' ,
142163 command : async () => {
143164 await workflowService .deleteWorkflow (workflowStore .activeWorkflow ! )
144165 },
145- visible: props . item . key === ' root '
166+ visible: isRoot
146167 }
147168 ]
148169})
You can’t perform that action at this time.
0 commit comments