|
|
@ -7,7 +7,7 @@ import { getPathIcon } from '@remix-ui/helper' |
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
|
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
|
|
import { FileLabel } from './file-label' |
|
|
|
import { FileLabel } from './file-label' |
|
|
|
import { fileDecoration, FileDecorationIcons } from '@remix-ui/file-decorators' |
|
|
|
import { fileDecoration, FileDecorationIcons } from '@remix-ui/file-decorators' |
|
|
|
import {Draggable} from "@remix-ui/drag-n-drop" |
|
|
|
import { Draggable } from "@remix-ui/drag-n-drop" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -84,23 +84,23 @@ export const FileRender = (props: RenderFileProps) => { |
|
|
|
key={`${file.path + props.index}`} |
|
|
|
key={`${file.path + props.index}`} |
|
|
|
label={<> |
|
|
|
label={<> |
|
|
|
<div className="d-flex flex-row"> |
|
|
|
<div className="d-flex flex-row"> |
|
|
|
<Draggable isDraggable={props.focusEdit.element!==null} file={file} expandedPath={props.expandPath} handleClickFolder={props.handleClickFolder}>
|
|
|
|
<Draggable isDraggable={props.focusEdit.element !== null} file={file} expandedPath={props.expandPath} handleClickFolder={props.handleClickFolder}> |
|
|
|
<FileLabel fileDecorations={props.fileDecorations} file={file} focusEdit={props.focusEdit} editModeOff={props.editModeOff} /> |
|
|
|
<FileLabel fileDecorations={props.fileDecorations} file={file} focusEdit={props.focusEdit} editModeOff={props.editModeOff} /> |
|
|
|
</Draggable> |
|
|
|
</Draggable> |
|
|
|
<FileDecorationIcons file={file} fileDecorations={props.fileDecorations}/> |
|
|
|
<FileDecorationIcons file={file} fileDecorations={props.fileDecorations} /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</>} |
|
|
|
</>} |
|
|
|
onClick={handleFolderClick} |
|
|
|
onClick={handleFolderClick} |
|
|
|
onContextMenu={handleContextMenu} |
|
|
|
onContextMenu={handleContextMenu} |
|
|
|
labelClass={labelClass} |
|
|
|
labelClass={labelClass} |
|
|
|
controlBehaviour={ props.ctrlKey } |
|
|
|
controlBehaviour={props.ctrlKey} |
|
|
|
expand={props.expandPath.includes(file.path)} |
|
|
|
expand={props.expandPath.includes(file.path)} |
|
|
|
onMouseOver={handleMouseOver} |
|
|
|
onMouseOver={handleMouseOver} |
|
|
|
onMouseOut={handleMouseOut} |
|
|
|
onMouseOut={handleMouseOut} |
|
|
|
expandedPaths={props.expandPath} |
|
|
|
expandedPaths={props.expandPath} |
|
|
|
> |
|
|
|
> |
|
|
|
{ |
|
|
|
{ |
|
|
|
file.child ? <TreeView id={`treeView${file.path}`} key={`treeView${file.path}`} {...spreadProps }>{ |
|
|
|
file.child ? <TreeView id={`treeView${file.path}`} key={`treeView${file.path}`} {...spreadProps}>{ |
|
|
|
Object.keys(file.child).map((key, index) => <FileRender |
|
|
|
Object.keys(file.child).map((key, index) => <FileRender |
|
|
|
file={file.child[key]} |
|
|
|
file={file.child[key]} |
|
|
|
fileDecorations={props.fileDecorations} |
|
|
|
fileDecorations={props.fileDecorations} |
|
|
@ -117,7 +117,7 @@ export const FileRender = (props: RenderFileProps) => { |
|
|
|
key={index} |
|
|
|
key={index} |
|
|
|
/>) |
|
|
|
/>) |
|
|
|
} |
|
|
|
} |
|
|
|
</TreeView> : <TreeView id={`treeView${file.path}`} key={`treeView${file.path}`} {...spreadProps }/> |
|
|
|
</TreeView> : <TreeView id={`treeView${file.path}`} key={`treeView${file.path}`} {...spreadProps} /> |
|
|
|
} |
|
|
|
} |
|
|
|
</TreeViewItem> |
|
|
|
</TreeViewItem> |
|
|
|
) |
|
|
|
) |
|
|
@ -127,13 +127,13 @@ export const FileRender = (props: RenderFileProps) => { |
|
|
|
id={`treeViewItem${file.path}`} |
|
|
|
id={`treeViewItem${file.path}`} |
|
|
|
key={`treeView${file.path}`} |
|
|
|
key={`treeView${file.path}`} |
|
|
|
label={ |
|
|
|
label={ |
|
|
|
<> |
|
|
|
<> |
|
|
|
<div className="d-flex flex-row"> |
|
|
|
<Draggable isDraggable={props.focusEdit.element !== null} file={file} expandedPath={props.expandPath} handleClickFolder={props.handleClickFolder}> |
|
|
|
<Draggable isDraggable={props.focusEdit.element!==null} file={file} expandedPath={props.expandPath} handleClickFolder={props.handleClickFolder}> |
|
|
|
<div className="d-flex flex-row"> |
|
|
|
<FileLabel fileDecorations={props.fileDecorations} file={file} focusEdit={props.focusEdit} editModeOff={props.editModeOff} /> |
|
|
|
<FileLabel fileDecorations={props.fileDecorations} file={file} focusEdit={props.focusEdit} editModeOff={props.editModeOff} /> |
|
|
|
|
|
|
|
<FileDecorationIcons file={file} fileDecorations={props.fileDecorations} /> |
|
|
|
|
|
|
|
</div> |
|
|
|
</Draggable> |
|
|
|
</Draggable> |
|
|
|
<FileDecorationIcons file={file} fileDecorations={props.fileDecorations}/> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</> |
|
|
|
</> |
|
|
|
} |
|
|
|
} |
|
|
|
onClick={handleFileClick} |
|
|
|
onClick={handleFileClick} |
|
|
|