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