mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 19:01:39 -04:00
YAML files will have code icon.
This commit is contained in:
parent
f1f1f42a1c
commit
71654841bd
2 changed files with 2 additions and 3 deletions
|
|
@ -601,7 +601,7 @@ export function FileIcon({file, disabled = true, size = 'huge', ...props}) {
|
|||
props['name'] = 'file';
|
||||
props['color'] = mimetypeColor(mimetype);
|
||||
if (mimetype) {
|
||||
if (mimetype.startsWith('text/html') || mimetype.startsWith('application/json')) {
|
||||
if (mimetype.startsWith('text/html') || mimetype.startsWith('application/json') || mimetype.startsWith('text/yaml')) {
|
||||
props['name'] = 'file code';
|
||||
} else if (mimetype.startsWith('application/pdf')) {
|
||||
props['name'] = 'file pdf';
|
||||
|
|
|
|||
|
|
@ -36,12 +36,11 @@ function Folder({folder, onFolderClick, sortData, selectedPath, onFileClick, onS
|
|||
<TableCell collapsing>
|
||||
<Checkbox checked={selectedPath === folder['path']} onChange={() => onSelect(folder['path'])}/>
|
||||
</TableCell>
|
||||
<TableCell onClick={() => onFolderClick(path)} className='file-path'>
|
||||
<TableCell onClick={() => onFolderClick(path)} className='file-path' colSpan={2}>
|
||||
{depthIndentation(pathWithNoTrailingSlash)}
|
||||
{is_empty ? <Icon name='folder outline'/> : <Icon name='folder'/>}
|
||||
{name}
|
||||
</TableCell>
|
||||
<TableCell/>
|
||||
</TableRow>;
|
||||
if (children && !_.isEmpty(children)) {
|
||||
// Folder has children, recursively display them.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue