|
|
@ -35,8 +35,7 @@ export const FileExplorer = (props: FileExplorerProps) => { |
|
|
|
uploadFile, |
|
|
|
uploadFile, |
|
|
|
uploadFolder, |
|
|
|
uploadFolder, |
|
|
|
fileState, |
|
|
|
fileState, |
|
|
|
canPaste, |
|
|
|
canPaste |
|
|
|
hasCopied |
|
|
|
|
|
|
|
} = props |
|
|
|
} = props |
|
|
|
const [state, setState] = useState<WorkSpaceState>(workspaceState) |
|
|
|
const [state, setState] = useState<WorkSpaceState>(workspaceState) |
|
|
|
// const [isPending, startTransition] = useTransition();
|
|
|
|
// const [isPending, startTransition] = useTransition();
|
|
|
@ -287,7 +286,7 @@ export const FileExplorer = (props: FileExplorerProps) => { |
|
|
|
targetDocument?.removeEventListener('keydown', CopyComboHandler) |
|
|
|
targetDocument?.removeEventListener('keydown', CopyComboHandler) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}, [treeRef.current, feTarget, canPaste, state.copyElement.length, hasCopied]) |
|
|
|
}, [treeRef.current, feTarget, feTarget.length, canPaste, state.copyElement, state.copyElement.length]) |
|
|
|
|
|
|
|
|
|
|
|
const hasReservedKeyword = (content: string): boolean => { |
|
|
|
const hasReservedKeyword = (content: string): boolean => { |
|
|
|
if (state.reservedKeywords.findIndex((value) => content.startsWith(value)) !== -1) return true |
|
|
|
if (state.reservedKeywords.findIndex((value) => content.startsWith(value)) !== -1) return true |
|
|
|