(dir?: boolean)
| 341 | }; |
| 342 | |
| 343 | const touchFile = async (dir?: boolean) => { |
| 344 | clearSelected(); |
| 345 | const dirname = dir |
| 346 | ? await openDialog(t("TXT_CODE_6215388a"), t("TXT_CODE_1b450b79")) |
| 347 | : await openDialog(t("TXT_CODE_791c73e9"), t("TXT_CODE_59cb16ff")); |
| 348 | const execute = dir ? addFolderApi().execute : touchFileApi().execute; |
| 349 | |
| 350 | try { |
| 351 | await execute({ |
| 352 | params: { |
| 353 | uuid: instanceId || "", |
| 354 | daemonId: daemonId || "" |
| 355 | }, |
| 356 | data: { |
| 357 | target: currentPath.value + dirname |
| 358 | } |
| 359 | }); |
| 360 | await getFileList(); |
| 361 | message.success(t("TXT_CODE_d28c05df")); |
| 362 | } catch (error: any) { |
| 363 | return reportErrorMsg(error.message); |
| 364 | } |
| 365 | }; |
| 366 | |
| 367 | const setClipBoard = (type: "copy" | "move", file?: string) => { |
| 368 | if (file) { |
nothing calls this directly
no test coverage detected