1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 08:28:11 +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:
llj
2023-11-22 11:29:01 +08:00
committed by GitHub
parent 4cc45a7874
commit 0b67fe5db7
9 changed files with 30 additions and 4 deletions

View File

@@ -38,6 +38,11 @@ class FileView extends React.Component {
};
}
componentDidMount() {
const fileIcon = Utils.getFileIconUrl(fileName, 192);
document.getElementById('favicon').href = fileIcon;
}
toggleDetailsPanel = () => {
this.setState({isDetailsPanelOpen: !this.state.isDetailsPanelOpen});
};