1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-19 10:26:17 +00:00

deleted files notice (#5426)

* batch delete files notice

* frontend page
This commit is contained in:
WJH
2023-07-19 10:44:30 +08:00
committed by GitHub
parent 80022abf0e
commit f81072c8a7
3 changed files with 38 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ const MSG_TYPE_DRAFT_COMMENT = 'draft_comment';
const MSG_TYPE_DRAFT_REVIEWER = 'draft_reviewer';
const MSG_TYPE_GUEST_INVITATION_ACCEPTED = 'guest_invitation_accepted';
const MSG_TYPE_REPO_MONITOR = 'repo_monitor';
const MSG_TYPE_DELETED_FILES = 'deleted_files';
class NoticeItem extends React.Component {
@@ -307,6 +308,21 @@ class NoticeItem extends React.Component {
return { avatar_url, notice };
}
if (noticeType === MSG_TYPE_DELETED_FILES) {
const {
repo_id,
repo_name,
} = detail;
const repoURL = `${siteRoot}library/${repo_id}/${encodeURIComponent(repo_name)}/`;
const repoLink = `<a href=${repoURL} target="_blank">${Utils.HTMLescape(repo_name)}</a>`;
let notice = gettext('Your library {libraryName} has recently deleted a large number of files.');
notice = notice.replace('{libraryName}', repoLink);
return { avatar_url : null, notice };
}
// if (noticeType === MSG_TYPE_GUEST_INVITATION_ACCEPTED) {
// }