mirror of
https://github.com/gchq/CyberChef.git
synced 2025-05-14 18:16:53 -04:00
fix all ESlint errors
This commit is contained in:
parent
daac91d970
commit
eb53667919
8 changed files with 100 additions and 78 deletions
|
@ -6,7 +6,6 @@
|
|||
|
||||
import {fuzzyMatch, calcMatchRanges} from "../../core/lib/FuzzyMatch.mjs";
|
||||
import {COperationList} from "../components/c-operation-list.mjs";
|
||||
import {COperationLi} from "../components/c-operation-li.mjs";
|
||||
|
||||
/**
|
||||
* Waiter to handle events related to the operations.
|
||||
|
@ -194,10 +193,10 @@ class OperationsWaiter {
|
|||
// Get list of Favourite operation names
|
||||
const favCatConfig = this.app.categories.find(catConfig => catConfig.name === "Favourites");
|
||||
|
||||
if(favCatConfig !== undefined) {
|
||||
if (favCatConfig !== undefined) {
|
||||
const opList = new COperationList(
|
||||
this.app,
|
||||
favCatConfig.ops.map( op => [op]),
|
||||
favCatConfig.ops.map(op => [op]),
|
||||
false,
|
||||
true,
|
||||
false,
|
||||
|
@ -205,7 +204,7 @@ class OperationsWaiter {
|
|||
class: "remove-icon",
|
||||
innerText: "delete"
|
||||
},
|
||||
)
|
||||
);
|
||||
|
||||
opList.build();
|
||||
div.appendChild(opList);
|
||||
|
|
|
@ -34,9 +34,18 @@ class RecipeWaiter {
|
|||
initDragAndDrop() {
|
||||
const recList = document.getElementById("rec-list");
|
||||
|
||||
let swapThreshold = this.app.isMobileView() ? 0.60 : 0.10;
|
||||
let animation = this.app.isMobileView() ? 400 : 200;
|
||||
let delay = this.app.isMobileView() ? 200 : 0;
|
||||
let swapThreshold, animation, delay;
|
||||
|
||||
// tweak these values for better user experiences per device type and UI
|
||||
if (this.app.isMobileView()) {
|
||||
swapThreshold = 0.60;
|
||||
animation = 400;
|
||||
delay = 200;
|
||||
} else {
|
||||
swapThreshold = 0.10;
|
||||
animation = 200;
|
||||
delay = 0;
|
||||
}
|
||||
|
||||
// Recipe list
|
||||
Sortable.create(recList, {
|
||||
|
@ -365,7 +374,7 @@ class RecipeWaiter {
|
|||
* @param {string} name - The name of the operation to add
|
||||
*/
|
||||
addOperation(name) {
|
||||
let item = this.buildRecipeOperation(name);
|
||||
const item = this.buildRecipeOperation(name);
|
||||
document.getElementById("rec-list").appendChild(item);
|
||||
|
||||
$(item).find("[data-toggle='tooltip']").tooltip();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue