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

Function initApp

src/sidebarApps/files/index.js:21–41  ·  view source on GitHub ↗

* Initialize files app * @param {HTMLElement} el

(el)

Source from the content-addressed store, hash-verified

19 * @param {HTMLElement} el
20 */
21function initApp(el) {
22 container = el;
23 container.classList.add("files");
24 container.setAttribute("data-msg", strings["open folder"]);
25 container.style.overflowX = "auto";
26 container.addEventListener("click", clickHandler);
27 editorManager.on(
28 ["new-file", "int-open-file-list", "remove-file"],
29 (position) => {
30 if (
31 typeof position === "string" &&
32 position !== settings.OPEN_FILE_LIST_POS_SIDEBAR
33 )
34 return;
35 const fileList = container.get(":scope > div.file-list");
36 if (fileList) fixHeight(fileList);
37 },
38 );
39 editorManager.on("add-folder", fixHeight);
40 Sidebar.on("show", onSelected);
41}
42
43/**
44 * On selected handler for files app

Callers

nothing calls this directly

Calls 4

fixHeightFunction · 0.85
addMethod · 0.80
onMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected