mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 17:33:18 +00:00
update markdown file icon (#2998)
This commit is contained in:
@@ -87,10 +87,15 @@ class TreeNodeView extends React.Component {
|
|||||||
type = 'file';
|
type = 'file';
|
||||||
} else {
|
} else {
|
||||||
let suffix = node.object.name.slice(index).toLowerCase();
|
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>;
|
icon = <i className="far fa-image"></i>;
|
||||||
type = 'image';
|
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>;
|
icon = <i className="far fa-file"></i>;
|
||||||
type = 'file';
|
type = 'file';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user