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

Function confirmUploadConflict

frontend/src/hooks/useFileManager.ts:608–645  ·  view source on GitHub ↗
(
    fileName: string,
    conflictCount: number
  )

Source from the content-addressed store, hash-verified

606 };
607
608 const confirmUploadConflict = async (
609 fileName: string,
610 conflictCount: number
611 ): Promise<UploadConflictDecision> => {
612 const all = ref(false);
613 const action = ref("skip");
614 const keep = await new Promise<boolean>((onComplete) => {
615 Modal.confirm({
616 title: t("TXT_CODE_99ca8563"),
617 icon: createVNode(ExclamationCircleOutlined),
618 content: createVNode(OverwriteFilesPopUpContent, {
619 count: conflictCount,
620 fileName: fileName,
621 action: action,
622 all: all,
623
624 "onUpdate:action": (val: string) => {
625 action.value = val;
626 },
627 "onUpdate:all": (val: boolean) => {
628 all.value = val;
629 }
630 }),
631 onOk() {
632 onComplete(true);
633 },
634 onCancel() {
635 onComplete(false);
636 }
637 });
638 });
639
640 return {
641 keep,
642 action: action.value,
643 applyToAll: all.value
644 };
645 };
646
647 const selectedFiles = async (files: File[], overridePath?: string) => {
648 const { state: missionCfg, execute: getUploadMissionCfg } = uploadAddress();

Callers 1

selectedFilesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected