diff options
author | crupest <crupest@outlook.com> | 2022-04-11 23:14:23 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2022-04-11 23:14:23 +0800 |
commit | c645e08ffd2fa572504b77d705a8f9d1507a718e (patch) | |
tree | ea3a6a7477b391fbf86077a636595141a6de2256 /FrontEnd/src/views/timeline/TimelineCard.tsx | |
parent | 9c0cb8f8d3944c813ef28ff9f736f148fd701a66 (diff) | |
download | timeline-c645e08ffd2fa572504b77d705a8f9d1507a718e.tar.gz timeline-c645e08ffd2fa572504b77d705a8f9d1507a718e.tar.bz2 timeline-c645e08ffd2fa572504b77d705a8f9d1507a718e.zip |
...
Diffstat (limited to 'FrontEnd/src/views/timeline/TimelineCard.tsx')
-rw-r--r-- | FrontEnd/src/views/timeline/TimelineCard.tsx | 29 |
1 files changed, 5 insertions, 24 deletions
diff --git a/FrontEnd/src/views/timeline/TimelineCard.tsx b/FrontEnd/src/views/timeline/TimelineCard.tsx index dcf5e870..872ad6d3 100644 --- a/FrontEnd/src/views/timeline/TimelineCard.tsx +++ b/FrontEnd/src/views/timeline/TimelineCard.tsx @@ -8,7 +8,6 @@ import { timelineVisibilityTooltipTranslationMap } from "@/services/timeline"; import { useUser } from "@/services/user"; import { pushAlert } from "@/services/alert"; import { HttpTimelineInfo } from "@/http/timeline"; -import { getHttpHighlightClient } from "@/http/highlight"; import { getHttpBookmarkClient } from "@/http/bookmark"; import UserAvatar from "../common/user/UserAvatar"; @@ -71,28 +70,6 @@ const TimelineCard: React.FC<TimelinePageCardProps> = (props) => { {t(timelineVisibilityTooltipTranslationMap[timeline.visibility])} </small> <div className="mt-2 cru-text-end"> - <i - className={classnames( - timeline.isHighlight ? "bi-star-fill" : "bi-star", - "icon-button cru-color-primary me-3" - )} - onClick={ - user?.hasHighlightTimelineAdministrationPermission - ? () => { - getHttpHighlightClient() - [timeline.isHighlight ? "delete" : "put"](timeline.nameV2) - .then(onReload, () => { - pushAlert({ - message: timeline.isHighlight - ? "timeline.removeHighlightFail" - : "timeline.addHighlightFail", - type: "danger", - }); - }); - } - : undefined - } - /> {user != null ? ( <i className={classnames( @@ -101,7 +78,11 @@ const TimelineCard: React.FC<TimelinePageCardProps> = (props) => { )} onClick={() => { getHttpBookmarkClient() - [timeline.isBookmark ? "delete" : "put"](timeline.nameV2) + [timeline.isBookmark ? "delete" : "post"]( + user.username, + timeline.owner.username, + timeline.nameV2 + ) .then(onReload, () => { pushAlert({ message: timeline.isBookmark |