MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / handleClick

Method handleClick

src/pages/quickTools/quickTools.js:390–406  ·  view source on GitHub ↗
(el)

Source from the content-addressed store, hash-verified

388 }
389
390 async handleClick(el) {
391 const type = el.dataset.type;
392 const index = Number.parseInt(el.dataset.index, 10);
393
394 let itemDef;
395 if (type === "active") {
396 const itemIndex = settings.value.quicktoolsItems[index];
397 itemDef = items[itemIndex];
398 } else {
399 itemDef = items[index];
400 }
401
402 if (itemDef) {
403 const desc = description(itemDef.id);
404 window.toast(desc, 2000);
405 }
406 }
407
408 destroy() {
409 if (this.longPressTimer) clearTimeout(this.longPressTimer);

Callers 2

handleTouchEndMethod · 0.95
upHandlerMethod · 0.95

Calls 1

descriptionFunction · 0.90

Tested by

no test coverage detected