mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-06 17:33:18 +00:00
[favicon] use file type icon as favicon for 'file view, shared file view' pages for different types of files (#5775)
This commit is contained in:
@@ -261,6 +261,9 @@ class MarkdownEditor extends React.Component {
|
||||
|
||||
async componentDidMount() {
|
||||
|
||||
const fileIcon = Utils.getFileIconUrl(fileName, 192);
|
||||
document.getElementById('favicon').href = fileIcon;
|
||||
|
||||
// get file info
|
||||
const fileInfoRes = await seafileAPI.getFileInfo(repoID, filePath);
|
||||
const { mtime, size, starred, permission, last_modifier_name, id } = fileInfoRes.data;
|
||||
|
Reference in New Issue
Block a user