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

Function handleClick

src/pages/plugins/plugins.js:292–321  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

290 });
291
292 function handleClick(event) {
293 const $target = event.target;
294 const { action } = $target.dataset;
295 if (action === "search") {
296 if (currSection === "all") {
297 isSearching = true;
298 searchBar(
299 $currList,
300 (hide) => {
301 hideSearchBar = hide;
302 isSearching = false;
303 },
304 undefined,
305 searchRemotely,
306 );
307 return;
308 } else {
309 isSearching = true;
310 searchBar($currList, (hide) => {
311 hideSearchBar = hide;
312 isSearching = false;
313 });
314 return;
315 }
316 }
317 if (action === "open") {
318 Plugin($target.dataset, onInstall, onUninstall);
319 return;
320 }
321 }
322
323 function render(section) {
324 if (currSection === section) return;

Callers

nothing calls this directly

Calls 2

searchBarFunction · 0.85
PluginClass · 0.85

Tested by

no test coverage detected