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 | 5e8c5c4e145e1eef799b1b745438de4c34fd3471 (patch) | |
tree | 269b40d2030461fd6d997af343d6c15484bbed45 /FrontEnd/src/app/views/timeline-common/TimelinePageTemplate.tsx | |
parent | be318ee2dbdc865c51dd7fc675cfb35c73e5b70b (diff) | |
download | timeline-5e8c5c4e145e1eef799b1b745438de4c34fd3471.tar.gz timeline-5e8c5c4e145e1eef799b1b745438de4c34fd3471.tar.bz2 timeline-5e8c5c4e145e1eef799b1b745438de4c34fd3471.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", }); }); |