@seafile/sdoc-editor 1.0.121 → 1.0.123
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/comment-item-collapse-wrapper.js +7 -0
- package/dist/basic-sdk/comment/components/comment-list.css +8 -12
- package/dist/basic-sdk/comment/components/comment-operation/index.js +0 -1
- package/dist/basic-sdk/comment/components/global-comment/index.css +17 -4
- package/dist/basic-sdk/comment/components/global-comment/index.js +3 -1
- package/dist/basic-sdk/comment/index.js +1 -0
- package/package.json +1 -1
|
@@ -32,6 +32,11 @@ const CommentItemCollapseWrapper = _ref => {
|
|
|
32
32
|
const [commentContent, setCommentContent] = (0, _react.useState)('');
|
|
33
33
|
const [replyContent, setReplyContent] = (0, _react.useState)('');
|
|
34
34
|
const isUnseen = notificationsInfo.notifications_map[`sdoc_notification_${topLevelComment.id}`] ? true : false;
|
|
35
|
+
const isReplayUnseen = (0, _react.useMemo)(() => {
|
|
36
|
+
if (!latestReply) return false;
|
|
37
|
+
const isUnseen = notificationsInfo.notifications_map[`sdoc_notification_${topLevelComment.id}_${latestReply.id}`] ? true : false;
|
|
38
|
+
return isUnseen;
|
|
39
|
+
}, [latestReply, notificationsInfo.notifications_map, topLevelComment.id]);
|
|
35
40
|
(0, _react.useEffect)(() => {
|
|
36
41
|
const initCommentContent = async () => {
|
|
37
42
|
const htmlString = await _mdToHtml.default.process(topLevelComment.comment);
|
|
@@ -122,6 +127,8 @@ const CommentItemCollapseWrapper = _ref => {
|
|
|
122
127
|
className: "comments-count"
|
|
123
128
|
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
124
129
|
className: "sdocfont sdoc-comments"
|
|
130
|
+
}), isReplayUnseen && /*#__PURE__*/_react.default.createElement("span", {
|
|
131
|
+
className: "sdoc-unread-message-tip"
|
|
125
132
|
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
126
133
|
className: "comments-count-number"
|
|
127
134
|
}, replyCount)), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
overflow-y: auto;
|
|
53
53
|
margin: 0;
|
|
54
54
|
padding: 0;
|
|
55
|
+
padding-bottom: 16px;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
.sdoc-comment-list-container .comment-item {
|
|
@@ -60,6 +61,10 @@
|
|
|
60
61
|
cursor: pointer;
|
|
61
62
|
}
|
|
62
63
|
|
|
64
|
+
.sdoc-comment-list-container .comment-item .comment-item-operation-wrapper {
|
|
65
|
+
margin-top: -12px;
|
|
66
|
+
}
|
|
67
|
+
|
|
63
68
|
.comment-delete-popover .comment-delete-popover-container {
|
|
64
69
|
padding: 16px;
|
|
65
70
|
}
|
|
@@ -70,10 +75,6 @@
|
|
|
70
75
|
width: 100%;
|
|
71
76
|
}
|
|
72
77
|
|
|
73
|
-
.sdoc-comment-list-container .comment-ui-container.active .comment-item:hover {
|
|
74
|
-
background: #fafafa;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
78
|
.sdoc-comment-list-container .comment-item .comment-header,
|
|
78
79
|
.sdoc-comment-list-container .comment-item .comment-author {
|
|
79
80
|
display: flex;
|
|
@@ -172,8 +173,8 @@
|
|
|
172
173
|
}
|
|
173
174
|
|
|
174
175
|
.sdoc-comment-list-container .comment-ui-container .comment-operation {
|
|
175
|
-
width:
|
|
176
|
-
height:
|
|
176
|
+
width: 24px;
|
|
177
|
+
height: 24px;
|
|
177
178
|
padding: 0 !important;
|
|
178
179
|
display: flex;
|
|
179
180
|
align-items: center;
|
|
@@ -189,11 +190,6 @@
|
|
|
189
190
|
background-color: #f0f0f0;
|
|
190
191
|
}
|
|
191
192
|
|
|
192
|
-
.sdoc-comment-list-container .comment-ui-container .comment-operation .sdoc-confirm {
|
|
193
|
-
color: #20a0ff;
|
|
194
|
-
font-weight: 800;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
193
|
.sdoc-comment-menu {
|
|
198
194
|
padding: 0;
|
|
199
195
|
border-radius: 2px;
|
|
@@ -322,7 +318,7 @@
|
|
|
322
318
|
}
|
|
323
319
|
|
|
324
320
|
.sdoc-article-container .sdoc-comment-list-container .comment-item {
|
|
325
|
-
padding: 16px;
|
|
321
|
+
padding: 16px 16px 0px 16px;
|
|
326
322
|
}
|
|
327
323
|
|
|
328
324
|
.sdoc-article-container .sdoc-comment-list-container .comment-item .comment-editor-wrapper.pb-3 {
|
|
@@ -12,7 +12,6 @@ require("./index.css");
|
|
|
12
12
|
function CommentsOperation() {
|
|
13
13
|
const [unseenNotificationsCount, setUnseenNotificationsCount] = (0, _react.useState)(0);
|
|
14
14
|
const updateUnseenNotificationsCount = (0, _react.useCallback)(count => {
|
|
15
|
-
console.log(count);
|
|
16
15
|
setUnseenNotificationsCount(count);
|
|
17
16
|
}, []);
|
|
18
17
|
(0, _react.useEffect)(() => {
|
|
@@ -206,6 +206,10 @@
|
|
|
206
206
|
background-color: #f5f5f5;
|
|
207
207
|
}
|
|
208
208
|
|
|
209
|
+
.sdoc-comment-drawer .sdoc-comment-list-container .comment-ui-container .comment-item-list {
|
|
210
|
+
padding-bottom: 0px;
|
|
211
|
+
}
|
|
212
|
+
|
|
209
213
|
.sdoc-comment-drawer .sdoc-comment-list-container .comment-ui-container .comment-item {
|
|
210
214
|
padding: 0px
|
|
211
215
|
}
|
|
@@ -235,6 +239,19 @@
|
|
|
235
239
|
.sdoc-comment-drawer .sdoc-comment-list-container .comment-item .comment-footer .comments-count {
|
|
236
240
|
display: flex;
|
|
237
241
|
align-items: center;
|
|
242
|
+
position: relative;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.sdoc-comment-drawer .sdoc-comment-list-container .comment-item .comment-footer .comments-count .sdoc-unread-message-tip {
|
|
246
|
+
position: absolute;
|
|
247
|
+
left: 6px;
|
|
248
|
+
top: 12px;
|
|
249
|
+
display: inline-block;
|
|
250
|
+
height: 6px;
|
|
251
|
+
width: 6px;
|
|
252
|
+
border-radius: 50%;
|
|
253
|
+
background-color: #fc6440;
|
|
254
|
+
margin-left: 6px;
|
|
238
255
|
}
|
|
239
256
|
|
|
240
257
|
.sdoc-comment-drawer .sdoc-comment-list-container .comment-item .comment-footer .comments-count .comments-count-number {
|
|
@@ -247,10 +264,6 @@
|
|
|
247
264
|
align-items: unset;
|
|
248
265
|
}
|
|
249
266
|
|
|
250
|
-
.sdoc-comment-drawer .sdoc-comment-list-container .comment-item .comment-item-operation-wrapper {
|
|
251
|
-
margin-top: -12px;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
267
|
.sdoc-comment-drawer .sdoc-comment-list-container .comment-item .comment-item-operation-wrapper .comment-operation {
|
|
255
268
|
width: 24px;
|
|
256
269
|
height: 24px;
|
|
@@ -25,6 +25,7 @@ require("./index.css");
|
|
|
25
25
|
const GlobalComment = _ref => {
|
|
26
26
|
let {
|
|
27
27
|
editor,
|
|
28
|
+
deleteUnseenNotifications,
|
|
28
29
|
t
|
|
29
30
|
} = _ref;
|
|
30
31
|
const commentRef = (0, _react.useRef)(null);
|
|
@@ -120,10 +121,11 @@ const GlobalComment = _ref => {
|
|
|
120
121
|
const activeCommentGroup = commentList.find(item => item.id === commentGroupId);
|
|
121
122
|
if (activeCommentGroup) {
|
|
122
123
|
setActiveCommentGroup(activeCommentGroup);
|
|
124
|
+
deleteUnseenNotifications && deleteUnseenNotifications(activeCommentGroup);
|
|
123
125
|
} else {
|
|
124
126
|
setActiveCommentGroup(null);
|
|
125
127
|
}
|
|
126
|
-
}, [commentList]);
|
|
128
|
+
}, [commentList, deleteUnseenNotifications]);
|
|
127
129
|
const commentEditorPlaceholder = !activeCommentGroup ? t('Enter_comment_shift_enter_for_new_line_Enter_to_send') : t('Enter_reply_shift_Enter_for_new_line_Enter_to_send');
|
|
128
130
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
129
131
|
className: "sdoc-comment-drawer"
|
|
@@ -59,6 +59,7 @@ const CommentWrapper = _ref => {
|
|
|
59
59
|
deleteUnseenNotifications: deleteUnseenNotifications,
|
|
60
60
|
editor: editor
|
|
61
61
|
}), type === 'global' && /*#__PURE__*/_react.default.createElement(_components.GlobalComment, {
|
|
62
|
+
deleteUnseenNotifications: deleteUnseenNotifications,
|
|
62
63
|
editor: editor
|
|
63
64
|
}));
|
|
64
65
|
};
|