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

optimize face cluster (#7069)

* optimize face cluster

* update

* optimize code
This commit is contained in:
JoinTyang
2024-12-04 17:13:47 +08:00
committed by GitHub
parent 2addf8d01f
commit 3a4db4bf70
5 changed files with 56 additions and 30 deletions

View File

@@ -23,6 +23,7 @@ const MSG_TYPE_DELETED_FILES = 'deleted_files';
const MSG_TYPE_SAML_SSO_FAILED = 'saml_sso_failed';
const MSG_TYPE_REPO_SHARE_PERM_CHANGE = 'repo_share_perm_change';
const MSG_TYPE_REPO_SHARE_PERM_DELETE = 'repo_share_perm_delete';
const MSG_TYPE_FACE_CLUSTER = 'face_cluster';
dayjs.extend(relativeTime);
@@ -354,6 +355,19 @@ class NoticeItem extends React.Component {
return { avatar_url: null, notice };
}
if (noticeType === MSG_TYPE_FACE_CLUSTER) {
let repo_id = detail.repo_id;
let repo_name = detail.repo_name;
const repoURL = `${siteRoot}library/${repo_id}/${encodeURIComponent(repo_name)}/`;
const repoLink = `<a href=${repoURL} target="_blank">${Utils.HTMLescape(repo_name)}</a>`;
let notice = gettext('Face recognition is done for library {libraryName}.');
notice = notice.replace('{libraryName}', repoLink);
return { avatar_url: null, notice };
}
if (noticeType === MSG_TYPE_SAML_SSO_FAILED) {
const { error_msg } = detail;
let notice = gettext(error_msg);