diff options
author | crupest <crupest@outlook.com> | 2020-12-23 22:35:11 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-12-23 22:35:11 +0800 |
commit | e89f8c73fe646e43f66a9f869b56267557c96df5 (patch) | |
tree | 1dcc81fee6bbd2be28e36083953d77cdb04a6299 /FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx | |
parent | a337ce43ae91c0c9a1c359dbb91faf75f1375505 (diff) | |
download | timeline-e89f8c73fe646e43f66a9f869b56267557c96df5.tar.gz timeline-e89f8c73fe646e43f66a9f869b56267557c96df5.tar.bz2 timeline-e89f8c73fe646e43f66a9f869b56267557c96df5.zip |
...
Diffstat (limited to 'FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx')
-rw-r--r-- | FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx b/FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx index 3833cdd9..21720601 100644 --- a/FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx +++ b/FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx @@ -12,6 +12,7 @@ import { useTimelineInfo, } from "@/services/timeline"; import { getHttpBookmarkClient } from "@/http/bookmark"; +import { getHttpHighlightClient } from "@/http/highlight"; import { TimelineMemberDialog } from "./TimelineMember"; import TimelinePropertyChangeDialog from "./TimelinePropertyChangeDialog"; @@ -124,7 +125,20 @@ export default function TimelinePageTemplate<TManageItem>( .put(name, user.token) .then(() => { pushAlert({ - message: "Succeeded to add bookmark!", //TODO: i18n + message: "Succeeded to add bookmark!", // TODO: i18n + type: "success", + }); + }); + } + : undefined, + onHighlight: + user != null && user.hasHighlightTimelineAdministrationPermission + ? () => { + void getHttpHighlightClient() + .put(name, user.token) + .then(() => { + pushAlert({ + message: "Succeeded to add highlight!", // TODO: i18n type: "success", }); }); |