1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-03 07:55:36 +00:00

update markdown file icon (#2998)

This commit is contained in:
Michael An
2019-02-26 10:34:09 +08:00
committed by Daniel Pan
parent abeae64d1b
commit 9d878b8ea3

View File

@@ -87,10 +87,15 @@ class TreeNodeView extends React.Component {
type = 'file';
} else {
let suffix = node.object.name.slice(index).toLowerCase();
if (suffix === '.png' || suffix === '.jpg') {
if (suffix === '.png' || suffix === '.jpg' || suffix === '.jpeg' || suffix === '.gif' || suffix === '.bmp') {
icon = <i className="far fa-image"></i>;
type = 'image';
} else {
}
else if (suffix === '.md' || suffix === '.markdown') {
icon = <i className="far fa-file-alt"></i>;
type = 'file';
}
else {
icon = <i className="far fa-file"></i>;
type = 'file';
}