From b2de76a9638a4c42b82a767ea0ae30eaf9be6c6d Mon Sep 17 00:00:00 2001 From: Felipe Martinez Date: Wed, 26 Jun 2024 01:20:13 +0200 Subject: [PATCH] Create folders --- frontend/wasm/infiniemu.d.ts | 1 + frontend/wasm/src/common.ts | 4 +- frontend/wasm/src/components/FileBrowser.vue | 24 ++++++++- frontend/wasm/src/utils.ts | 4 ++ frontend/wasm/src/worker.ts | 54 ++++++++++++++------ src/CMakeLists.txt | 2 +- 6 files changed, 69 insertions(+), 20 deletions(-) diff --git a/frontend/wasm/infiniemu.d.ts b/frontend/wasm/infiniemu.d.ts index b851d60..f554ded 100644 --- a/frontend/wasm/infiniemu.d.ts +++ b/frontend/wasm/infiniemu.d.ts @@ -67,6 +67,7 @@ const module: EmscriptenModuleFactory { + const { type, data } = event.data as MessageFromWorkerType; + + if (type == "createdDir" && data == path) { + props.worker.removeEventListener("message", listener); + emit("loadEnd"); + refresh(); + } + }; + + props.worker.addEventListener("message", listener); + sendMessage(props.worker, "createDir", path); + } +}