mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-07 06:57:12 -04:00
add option to c-operation-list to set op-list to isCloneable to recipe
This commit is contained in:
parent
8ebce91834
commit
1fc5ca641d
1 changed files with 14 additions and 4 deletions
|
@ -14,16 +14,19 @@ export class COperationList extends HTMLElement {
|
|||
app,
|
||||
opNames,
|
||||
includeStarIcon,
|
||||
isSortable = false,
|
||||
isCloneable = true,
|
||||
icon,
|
||||
isSortable = false
|
||||
|
||||
) {
|
||||
super();
|
||||
|
||||
this.app = app;
|
||||
this.opNames = opNames;
|
||||
this.includeStarIcon = includeStarIcon;
|
||||
this.icon = icon;
|
||||
this.isSortable = isSortable;
|
||||
this.isCloneable = isCloneable;
|
||||
this.icon = icon;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -66,10 +69,17 @@ export class COperationList extends HTMLElement {
|
|||
}
|
||||
}.bind(this),
|
||||
});
|
||||
} else if (!this.app.isMobileView() && this.isCloneable) {
|
||||
const cloneableList = Sortable.create(ul, {
|
||||
group: {
|
||||
name: "recipe",
|
||||
pull: "clone",
|
||||
},
|
||||
draggable: "c-operation-li",
|
||||
sort: false
|
||||
})
|
||||
}
|
||||
|
||||
ul.dispatchEvent(this.app.manager.oplistcreate);
|
||||
|
||||
this.append(ul);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue