@seafile/sdoc-editor 0.4.6-1 → 0.4.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -17,23 +17,12 @@ const DocInfo = _ref => {
|
|
|
17
17
|
isEditMode,
|
|
18
18
|
isPublished = false
|
|
19
19
|
} = _ref;
|
|
20
|
-
const isSdocRevision = context.getSetting('isSdocRevision');
|
|
21
|
-
const docName = context.getSetting('docName');
|
|
22
|
-
const {
|
|
23
|
-
isShowInternalLink,
|
|
24
|
-
isStarIconShown,
|
|
25
|
-
isFreezed
|
|
26
|
-
} = context.getSettings();
|
|
27
20
|
const onInternalLinkClick = useCallback(() => {
|
|
28
21
|
const eventBus = EventBus.getInstance();
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return;
|
|
34
|
-
}
|
|
35
|
-
eventBus.dispatch(EXTERNAL_EVENT.INTERNAL_LINK_CLICK);
|
|
36
|
-
}, [isSdocRevision]);
|
|
22
|
+
eventBus.dispatch(EXTERNAL_EVENT.INTERNAL_LINK_CLICK, {
|
|
23
|
+
internalLink: window.location.href
|
|
24
|
+
});
|
|
25
|
+
}, []);
|
|
37
26
|
const toggleStar = useCallback(() => {
|
|
38
27
|
const eventBus = EventBus.getInstance();
|
|
39
28
|
eventBus.dispatch(EXTERNAL_EVENT.TOGGLE_STAR);
|
|
@@ -42,6 +31,13 @@ const DocInfo = _ref => {
|
|
|
42
31
|
const originFileURL = context.getSetting('originFileURL');
|
|
43
32
|
window.open(originFileURL, '_blank');
|
|
44
33
|
}, []);
|
|
34
|
+
const isSdocRevision = context.getSetting('isSdocRevision');
|
|
35
|
+
const docName = context.getSetting('docName');
|
|
36
|
+
const {
|
|
37
|
+
isShowInternalLink,
|
|
38
|
+
isStarIconShown,
|
|
39
|
+
isFreezed
|
|
40
|
+
} = context.getSettings();
|
|
45
41
|
const docInfo = /*#__PURE__*/React.createElement(React.Fragment, null, isDraft && /*#__PURE__*/React.createElement(DraftDropdown, null), isStarIconShown && /*#__PURE__*/React.createElement("button", {
|
|
46
42
|
className: "doc-icon sdocfont ".concat(isStarred ? 'sdoc-starred' : 'sdoc-unstarred', " border-0 p-0 bg-transparent"),
|
|
47
43
|
title: isStarred ? t('Starred') : t('Unstarred'),
|