@seafile/sdoc-editor 0.2.15 → 0.2.17
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.
- package/dist/basic-sdk/assets/css/textlink-hovermenu.css +1 -0
- package/dist/basic-sdk/comment/comment/global-comment.js +3 -2
- package/dist/basic-sdk/extension/plugins/image/hover-menu/index.js +3 -1
- package/dist/basic-sdk/extension/plugins/link/hover/index.js +3 -3
- package/dist/components/doc-operations/revision-operations/more-revision-operations/index.js +2 -1
- package/dist/components/tooltip/index.css +4 -0
- package/package.json +1 -1
|
@@ -42,7 +42,8 @@ var GlobalComment = function GlobalComment(_ref) {
|
|
|
42
42
|
useEffect(function () {
|
|
43
43
|
var eventBus = EventBus.getInstance();
|
|
44
44
|
var unsubscribe = eventBus.subscribe('COMMENT_LIST_CLICK', function () {
|
|
45
|
-
|
|
45
|
+
setActiveComment(null);
|
|
46
|
+
setShowCommentList(!isShowCommentList);
|
|
46
47
|
});
|
|
47
48
|
return function () {
|
|
48
49
|
unsubscribe();
|
|
@@ -61,7 +62,7 @@ var GlobalComment = function GlobalComment(_ref) {
|
|
|
61
62
|
}, []);
|
|
62
63
|
if (!isShowCommentList) return null;
|
|
63
64
|
return /*#__PURE__*/React.createElement(ElementPopover, {
|
|
64
|
-
className:
|
|
65
|
+
className: "global-comments-popover"
|
|
65
66
|
}, /*#__PURE__*/React.createElement("div", {
|
|
66
67
|
ref: commentRef,
|
|
67
68
|
className: "comments-panel-wrapper"
|
|
@@ -25,6 +25,8 @@ var ImageHoverMenu = function ImageHoverMenu(_ref) {
|
|
|
25
25
|
align = element.align,
|
|
26
26
|
_element$border_type = element.border_type,
|
|
27
27
|
border_type = _element$border_type === void 0 ? IMAGE_BORDER_TYPE[0].type : _element$border_type;
|
|
28
|
+
var _data$caption = data.caption,
|
|
29
|
+
caption = _data$caption === void 0 ? '' : _data$caption;
|
|
28
30
|
var _useState = useState({
|
|
29
31
|
displayPopover: false,
|
|
30
32
|
alignPopover: false,
|
|
@@ -121,7 +123,7 @@ var ImageHoverMenu = function ImageHoverMenu(_ref) {
|
|
|
121
123
|
id: "sdoc_image_caption",
|
|
122
124
|
role: "button",
|
|
123
125
|
className: classnames('op-item', 'ml-1', {
|
|
124
|
-
'active': (
|
|
126
|
+
'active': (caption === null || caption === void 0 ? void 0 : caption.length) !== 0
|
|
125
127
|
}),
|
|
126
128
|
onClick: function onClick() {
|
|
127
129
|
onShowCaption();
|
|
@@ -23,12 +23,12 @@ var LinkHover = function LinkHover(_ref) {
|
|
|
23
23
|
return /*#__PURE__*/React.createElement(React.Fragment, null, createPortal( /*#__PURE__*/React.createElement("div", {
|
|
24
24
|
id: "link-op-menu",
|
|
25
25
|
className: "link-op-menu",
|
|
26
|
-
style: menuPosition
|
|
27
|
-
onMouseDown: onMouseDown
|
|
26
|
+
style: menuPosition
|
|
28
27
|
}, /*#__PURE__*/React.createElement("span", {
|
|
29
28
|
target: "_blank",
|
|
30
29
|
rel: "noopener noreferrer",
|
|
31
|
-
className: "link-op-menu-link"
|
|
30
|
+
className: "link-op-menu-link",
|
|
31
|
+
onMouseDown: onMouseDown
|
|
32
32
|
}, t('Open_link')), /*#__PURE__*/React.createElement("div", {
|
|
33
33
|
className: "link-op-icons d-flex"
|
|
34
34
|
}, /*#__PURE__*/React.createElement("span", {
|
package/dist/components/doc-operations/revision-operations/more-revision-operations/index.js
CHANGED
|
@@ -19,7 +19,8 @@ var MoreRevisionOperations = function MoreRevisionOperations(_ref) {
|
|
|
19
19
|
context.startRevise().then(function (res) {
|
|
20
20
|
var repoID = context.getSetting('repoID');
|
|
21
21
|
var siteRoot = context.getSetting('siteRoot');
|
|
22
|
-
|
|
22
|
+
var revisionURL = "".concat(siteRoot, "lib/").concat(repoID, "/revisions/").concat(res.data.revision_id, "/?").concat(REVISION_FIRST_LOAD_KEY, "=").concat(REVISION_FIRST_LOAD_VALUE);
|
|
23
|
+
window.open(revisionURL, '_blank');
|
|
23
24
|
}).catch(function (error) {
|
|
24
25
|
toaster.danger(t('Error'));
|
|
25
26
|
});
|