|
|
@ -1,6 +1,5 @@ |
|
|
|
// eslint-disable-next-line no-use-before-define
|
|
|
|
// eslint-disable-next-line no-use-before-define
|
|
|
|
import { fileDecoration } from '@remix-ui/file-decorators' |
|
|
|
import { fileDecoration } from '@remix-ui/file-decorators' |
|
|
|
import { CustomTooltip } from '@remix-ui/helper' |
|
|
|
|
|
|
|
import React, { useEffect, useRef, useState } from 'react' |
|
|
|
import React, { useEffect, useRef, useState } from 'react' |
|
|
|
import { FileType } from '../types' |
|
|
|
import { FileType } from '../types' |
|
|
|
|
|
|
|
|
|
|
@ -70,20 +69,13 @@ export const FileLabel = (props: FileLabelProps) => { |
|
|
|
contentEditable={isEditable} |
|
|
|
contentEditable={isEditable} |
|
|
|
onKeyDown={handleEditInput} |
|
|
|
onKeyDown={handleEditInput} |
|
|
|
onBlur={handleEditBlur} |
|
|
|
onBlur={handleEditBlur} |
|
|
|
> |
|
|
|
|
|
|
|
<CustomTooltip |
|
|
|
|
|
|
|
placement="right-start" |
|
|
|
|
|
|
|
tooltipText={file.path} |
|
|
|
|
|
|
|
tooltipClasses="text-nowrap" |
|
|
|
|
|
|
|
tooltipId="fileLabelTooltip" |
|
|
|
|
|
|
|
> |
|
|
|
> |
|
|
|
<span |
|
|
|
<span |
|
|
|
className={`text-nowrap remixui_label ${fileStateClasses} ` + (file.isDirectory ? 'folder' : 'remixui_leaf')} |
|
|
|
className={`text-nowrap remixui_label ${fileStateClasses} ` + (file.isDirectory ? 'folder' : 'remixui_leaf')} |
|
|
|
data-path={file.path} |
|
|
|
data-path={file.path} title={file.path} |
|
|
|
> |
|
|
|
> |
|
|
|
{file.name} |
|
|
|
{file.name} |
|
|
|
</span> |
|
|
|
</span> |
|
|
|
</CustomTooltip> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
) |
|
|
|
) |
|
|
|
} |
|
|
|
} |
|
|
|