|
|
@ -103,8 +103,7 @@ export const FileExplorer = (props: FileExplorerProps) => { |
|
|
|
const { expandPath } = state |
|
|
|
const { expandPath } = state |
|
|
|
|
|
|
|
|
|
|
|
if (expandPath && expandPath.length > 0) { |
|
|
|
if (expandPath && expandPath.length > 0) { |
|
|
|
expandPath.map(async (path, index) => { |
|
|
|
expandPath.map(async (path) => { |
|
|
|
console.log('path ' + index + ' :', path) |
|
|
|
|
|
|
|
const files = await resolveDirectory(path, state.files) |
|
|
|
const files = await resolveDirectory(path, state.files) |
|
|
|
|
|
|
|
|
|
|
|
setState(prevState => { |
|
|
|
setState(prevState => { |
|
|
@ -123,7 +122,7 @@ export const FileExplorer = (props: FileExplorerProps) => { |
|
|
|
dir = await Promise.all(dir.map(async (file) => { |
|
|
|
dir = await Promise.all(dir.map(async (file) => { |
|
|
|
if (file.path === folderPath) { |
|
|
|
if (file.path === folderPath) { |
|
|
|
if (file.child) { |
|
|
|
if (file.child) { |
|
|
|
const newInput = file.child.filter(({ path }) => path === 'browser/blank') |
|
|
|
const newInput = file.child.filter(({ path }) => path.endsWith('/blank')) |
|
|
|
|
|
|
|
|
|
|
|
if (newInput.length === 1) { |
|
|
|
if (newInput.length === 1) { |
|
|
|
const dirContent = await fetchDirectoryContent(folderPath) |
|
|
|
const dirContent = await fetchDirectoryContent(folderPath) |
|
|
@ -880,7 +879,7 @@ export const FileExplorer = (props: FileExplorerProps) => { |
|
|
|
label={label(file)} |
|
|
|
label={label(file)} |
|
|
|
onClick={(e) => { |
|
|
|
onClick={(e) => { |
|
|
|
e.stopPropagation() |
|
|
|
e.stopPropagation() |
|
|
|
handleClickFolder(file.path) |
|
|
|
if (state.focusEdit.element !== file.path) handleClickFolder(file.path) |
|
|
|
}} |
|
|
|
}} |
|
|
|
onContextMenu={(e) => { |
|
|
|
onContextMenu={(e) => { |
|
|
|
e.preventDefault() |
|
|
|
e.preventDefault() |
|
|
|