Skip to content

Commit

Permalink
optimize ui
Browse files Browse the repository at this point in the history
  • Loading branch information
孙永强 committed Nov 28, 2024
1 parent 59a8266 commit d02c910
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions frontend/src/components/common/notice-item.js
Original file line number Diff line number Diff line change
Expand Up @@ -368,19 +368,41 @@ class NoticeItem extends React.Component {
let avatar_url = detail.avatar_url;
let notice = detail.comment;
let username = detail.user_name;
let is_resolved = detail.is_resolved;
let sdoc_name = detail.sdoc_name;
const repo_id = detail.repo_id;
const sdoc_path = detail.sdoc_path;
const sdoc_href = siteRoot + 'lib/' + repo_id + '/file' + sdoc_path;
let sdoc_link = '<a href=' + sdoc_href + '>' + sdoc_name + '</a>';
processor.process(notice, (error, vfile) => {
notice = String(vfile);
});
if (is_resolved) {
notice = 'Marked "' + detail.resolve_comment + '" as resolved in document ' + sdoc_link;
} else {
notice = 'Added a new comment in document ' + sdoc_link + ':' + notice;
}
return { avatar_url, username, notice };
}

if (noticeType === MSG_TYPE_SEADOC_REPLY) {
let avatar_url = detail.avatar_url;
let notice = detail.reply;
let username = detail.user_name;
let is_resolved = detail.is_resolved;
let sdoc_name = detail.sdoc_name;
const repo_id = detail.repo_id;
const sdoc_path = detail.sdoc_path;
const sdoc_href = siteRoot + 'lib/' + repo_id + '/file' + sdoc_path;
let sdoc_link = '<a href=' + sdoc_href + '>' + sdoc_name + '</a>';
processor.process(notice, (error, vfile) => {
notice = String(vfile);
});
if (is_resolved) {
notice = 'Marked "' + detail.resolve_comment + '" as resolved in document ' + sdoc_link;
} else {
notice = 'Added a new reply in document ' + sdoc_link + ':' + notice;
}
return { avatar_url, username, notice };
}

Expand Down

0 comments on commit d02c910

Please sign in to comment.