mirror of
https://github.com/haiwen/seahub.git
synced 2025-04-27 19:05:16 +00:00
set exdraw favicon (#7742)
This commit is contained in:
parent
b398c493c2
commit
a524757a92
@ -5,6 +5,7 @@ import isHotkey from 'is-hotkey';
|
||||
import { gettext } from '../../utils/constants';
|
||||
import toaster from '../../components/toast';
|
||||
import { SAVE_INTERVAL_TIME } from './constants';
|
||||
import { Utils } from '../../utils/utils';
|
||||
|
||||
import './index.css';
|
||||
|
||||
@ -23,6 +24,7 @@ const ExcaliEditor = () => {
|
||||
setFileContent(res.data);
|
||||
setIsFetching(false);
|
||||
});
|
||||
onSetFavicon();
|
||||
}, []);
|
||||
|
||||
const saveSceneContent = useCallback(async () => {
|
||||
@ -83,6 +85,12 @@ const ExcaliEditor = () => {
|
||||
isChangedRef.current = true;
|
||||
}, []);
|
||||
|
||||
const onSetFavicon = useCallback(() => {
|
||||
const { docName } = window.app.pageOptions;
|
||||
const fileIcon = Utils.getFileIconUrl(docName);
|
||||
document.getElementById('favicon').href = fileIcon;
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<SimpleEditor
|
||||
isFetching={isFetching}
|
||||
|
Loading…
Reference in New Issue
Block a user