mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-08 07:21:02 -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,
|
app,
|
||||||
opNames,
|
opNames,
|
||||||
includeStarIcon,
|
includeStarIcon,
|
||||||
|
isSortable = false,
|
||||||
|
isCloneable = true,
|
||||||
icon,
|
icon,
|
||||||
isSortable = false
|
|
||||||
) {
|
) {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
this.app = app;
|
this.app = app;
|
||||||
this.opNames = opNames;
|
this.opNames = opNames;
|
||||||
this.includeStarIcon = includeStarIcon;
|
this.includeStarIcon = includeStarIcon;
|
||||||
this.icon = icon;
|
|
||||||
this.isSortable = isSortable;
|
this.isSortable = isSortable;
|
||||||
|
this.isCloneable = isCloneable;
|
||||||
|
this.icon = icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -66,10 +69,17 @@ export class COperationList extends HTMLElement {
|
||||||
}
|
}
|
||||||
}.bind(this),
|
}.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);
|
this.append(ul);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue