@seafile/sdoc-editor 0.5.21 → 0.5.23
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/comment/components/global-comment/global-comment-header.js +18 -3
- package/package.json +1 -1
- package/public/locales/cs/sdoc-editor.json +2 -1
- package/public/locales/de/sdoc-editor.json +2 -1
- package/public/locales/en/sdoc-editor.json +2 -1
- package/public/locales/es/sdoc-editor.json +2 -1
- package/public/locales/fr/sdoc-editor.json +2 -1
- package/public/locales/it/sdoc-editor.json +2 -1
- package/public/locales/ru/sdoc-editor.json +2 -1
- package/public/locales/zh_CN/sdoc-editor.json +2 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import React, { useCallback } from 'react';
|
|
1
|
+
import React, { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
2
|
import { useTranslation } from 'react-i18next';
|
|
3
3
|
import { eventStopPropagation } from '../../../utils/mouse-event';
|
|
4
4
|
import context from '../../../../context';
|
|
5
5
|
import { INTERNAL_EVENT } from '../../../constants';
|
|
6
6
|
import EventBus from '../../../utils/event-bus';
|
|
7
7
|
import { EXTERNAL_EVENT } from '../../../../constants';
|
|
8
|
+
import Tooltip from '../../../../components/tooltip';
|
|
8
9
|
const GlobalCommentHeader = _ref => {
|
|
9
10
|
let {
|
|
10
11
|
toggle,
|
|
@@ -13,6 +14,13 @@ const GlobalCommentHeader = _ref => {
|
|
|
13
14
|
const {
|
|
14
15
|
t
|
|
15
16
|
} = useTranslation();
|
|
17
|
+
const panelHeaderRef = useRef(null);
|
|
18
|
+
const [isMounted, setIsMounted] = useState(false);
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
if (panelHeaderRef.current) {
|
|
21
|
+
setIsMounted(true);
|
|
22
|
+
}
|
|
23
|
+
}, []);
|
|
16
24
|
const toggleADDComment = useCallback(event => {
|
|
17
25
|
eventStopPropagation(event);
|
|
18
26
|
toggleGlobalCommentEditor();
|
|
@@ -36,18 +44,25 @@ const GlobalCommentHeader = _ref => {
|
|
|
36
44
|
}, /*#__PURE__*/React.createElement("span", {
|
|
37
45
|
className: "title"
|
|
38
46
|
}, t('Comments')), /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
ref: panelHeaderRef,
|
|
39
48
|
className: "comments-panel-header-right"
|
|
40
49
|
}, /*#__PURE__*/React.createElement("div", {
|
|
50
|
+
id: "sdoc-read-all-btn",
|
|
41
51
|
className: "sdoc-icon-btn",
|
|
42
52
|
onClick: toggleReadAll
|
|
43
53
|
}, /*#__PURE__*/React.createElement("i", {
|
|
44
54
|
className: "sdocfont sdoc-all-read"
|
|
45
|
-
})
|
|
55
|
+
}), isMounted && /*#__PURE__*/React.createElement(Tooltip, {
|
|
56
|
+
target: "sdoc-read-all-btn"
|
|
57
|
+
}, t('Mark_all_as_read'))), /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
id: "sdoc-add-comment-btn",
|
|
46
59
|
className: "sdoc-icon-btn",
|
|
47
60
|
onClick: toggleADDComment
|
|
48
61
|
}, /*#__PURE__*/React.createElement("i", {
|
|
49
62
|
className: "sdocfont sdoc-add-comment"
|
|
50
|
-
})
|
|
63
|
+
}), isMounted && /*#__PURE__*/React.createElement(Tooltip, {
|
|
64
|
+
target: "sdoc-add-comment-btn"
|
|
65
|
+
}, t('Add_comment'))), /*#__PURE__*/React.createElement("div", {
|
|
51
66
|
className: "sdoc-icon-btn",
|
|
52
67
|
onClick: toggle
|
|
53
68
|
}, /*#__PURE__*/React.createElement("i", {
|
package/package.json
CHANGED
|
@@ -450,5 +450,6 @@
|
|
|
450
450
|
"Center_align": "Middle",
|
|
451
451
|
"Bottom_align": "Bottom",
|
|
452
452
|
"Move_column_count": "Moving {{count}} column(s)",
|
|
453
|
-
"Move_row_count": "Moving {{count}} row(s)"
|
|
453
|
+
"Move_row_count": "Moving {{count}} row(s)",
|
|
454
|
+
"Mark_all_as_read": "Mark all as read"
|
|
454
455
|
}
|
|
@@ -450,5 +450,6 @@
|
|
|
450
450
|
"Center_align": "Middle",
|
|
451
451
|
"Bottom_align": "Bottom",
|
|
452
452
|
"Move_column_count": "Moving {{count}} column(s)",
|
|
453
|
-
"Move_row_count": "Moving {{count}} row(s)"
|
|
453
|
+
"Move_row_count": "Moving {{count}} row(s)",
|
|
454
|
+
"Mark_all_as_read": "Alle als gelesen markieren"
|
|
454
455
|
}
|
|
@@ -450,5 +450,6 @@
|
|
|
450
450
|
"Center_align": "Middle",
|
|
451
451
|
"Bottom_align": "Bottom",
|
|
452
452
|
"Move_column_count": "Moving {{count}} column(s)",
|
|
453
|
-
"Move_row_count": "Moving {{count}} row(s)"
|
|
453
|
+
"Move_row_count": "Moving {{count}} row(s)",
|
|
454
|
+
"Mark_all_as_read": "Mark all as read"
|
|
454
455
|
}
|
|
@@ -450,5 +450,6 @@
|
|
|
450
450
|
"Center_align": "Middle",
|
|
451
451
|
"Bottom_align": "Bottom",
|
|
452
452
|
"Move_column_count": "Moving {{count}} column(s)",
|
|
453
|
-
"Move_row_count": "Moving {{count}} row(s)"
|
|
453
|
+
"Move_row_count": "Moving {{count}} row(s)",
|
|
454
|
+
"Mark_all_as_read": "Mark all as read"
|
|
454
455
|
}
|
|
@@ -450,5 +450,6 @@
|
|
|
450
450
|
"Center_align": "Middle",
|
|
451
451
|
"Bottom_align": "Bottom",
|
|
452
452
|
"Move_column_count": "Moving {{count}} column(s)",
|
|
453
|
-
"Move_row_count": "Moving {{count}} row(s)"
|
|
453
|
+
"Move_row_count": "Moving {{count}} row(s)",
|
|
454
|
+
"Mark_all_as_read": "Mark all as read"
|
|
454
455
|
}
|
|
@@ -450,5 +450,6 @@
|
|
|
450
450
|
"Center_align": "Middle",
|
|
451
451
|
"Bottom_align": "Bottom",
|
|
452
452
|
"Move_column_count": "Moving {{count}} column(s)",
|
|
453
|
-
"Move_row_count": "Moving {{count}} row(s)"
|
|
453
|
+
"Move_row_count": "Moving {{count}} row(s)",
|
|
454
|
+
"Mark_all_as_read": "Mark all as read"
|
|
454
455
|
}
|
|
@@ -450,5 +450,6 @@
|
|
|
450
450
|
"Center_align": "Середина",
|
|
451
451
|
"Bottom_align": "Низ",
|
|
452
452
|
"Move_column_count": "Перемещение {{count}} столбцов",
|
|
453
|
-
"Move_row_count": "Перемещение {{count}} строк"
|
|
453
|
+
"Move_row_count": "Перемещение {{count}} строк",
|
|
454
|
+
"Mark_all_as_read": "Отметить все как прочитанное"
|
|
454
455
|
}
|