MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / onOk

Function onOk

frontend/src/hooks/useFileManager.ts:459–468  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

457 icon: createVNode(ExclamationCircleOutlined),
458 content: createVNode("div", { style: "color:red;" }, t("TXT_CODE_6a10302d")),
459 async onOk() {
460 if (!isMultiple.value) {
461 // one file
462 await useDeleteFileApi([currentPath.value + file]);
463 } else {
464 // more file
465 if (!selectionData.value) return reportErrorMsg(t("TXT_CODE_f41ad30a"));
466 await useDeleteFileApi(selectionData.value.map((e) => currentPath.value + e.name));
467 }
468 },
469 okType: "danger",
470 okText: t("TXT_CODE_d507abff"),
471 class: "test"

Callers

nothing calls this directly

Calls 2

reportErrorMsgFunction · 0.90
useDeleteFileApiFunction · 0.85

Tested by

no test coverage detected