From 71654841bdbb4d1283c22a723327a5e850c94d5e Mon Sep 17 00:00:00 2001 From: Roland Date: Tue, 14 Feb 2023 08:11:01 -0700 Subject: [PATCH] YAML files will have code icon. --- app/src/components/Common.js | 2 +- app/src/components/FileBrowser.js | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/components/Common.js b/app/src/components/Common.js index b9c6f288..e2f2180e 100644 --- a/app/src/components/Common.js +++ b/app/src/components/Common.js @@ -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'; diff --git a/app/src/components/FileBrowser.js b/app/src/components/FileBrowser.js index 09e98b80..5dd64d83 100644 --- a/app/src/components/FileBrowser.js +++ b/app/src/components/FileBrowser.js @@ -36,12 +36,11 @@ function Folder({folder, onFolderClick, sortData, selectedPath, onFileClick, onS onSelect(folder['path'])}/> - onFolderClick(path)} className='file-path'> + onFolderClick(path)} className='file-path' colSpan={2}> {depthIndentation(pathWithNoTrailingSlash)} {is_empty ? : } {name} - ; if (children && !_.isEmpty(children)) { // Folder has children, recursively display them.