diff options
| author | crupest <crupest@outlook.com> | 2021-02-20 22:45:07 +0800 | 
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2021-02-20 22:45:07 +0800 | 
| commit | ad61f58644b3f0fac451dbc5b869471edcad0cf4 (patch) | |
| tree | 8dd1cb3e15a3a8f4d90c0b57a028de08adfa2244 /FrontEnd/src/app/views/timeline/TimelineCard.tsx | |
| parent | a58ea3757f4749406274142b47e4d6d90ecf4015 (diff) | |
| download | timeline-ad61f58644b3f0fac451dbc5b869471edcad0cf4.tar.gz timeline-ad61f58644b3f0fac451dbc5b869471edcad0cf4.tar.bz2 timeline-ad61f58644b3f0fac451dbc5b869471edcad0cf4.zip  | |
...
Diffstat (limited to 'FrontEnd/src/app/views/timeline/TimelineCard.tsx')
| -rw-r--r-- | FrontEnd/src/app/views/timeline/TimelineCard.tsx | 27 | 
1 files changed, 8 insertions, 19 deletions
diff --git a/FrontEnd/src/app/views/timeline/TimelineCard.tsx b/FrontEnd/src/app/views/timeline/TimelineCard.tsx index a777cbbd..2a9bcfc8 100644 --- a/FrontEnd/src/app/views/timeline/TimelineCard.tsx +++ b/FrontEnd/src/app/views/timeline/TimelineCard.tsx @@ -1,9 +1,8 @@  import React from "react"; -import TimelinePageCardTemplate, { -  TimelineCardTemplateProps, -} from "../timeline-common/TimelinePageCardTemplate";  import { TimelinePageCardProps } from "../timeline-common/TimelinePageTemplate"; +import TimelinePageCardTemplate from "../timeline-common/TimelinePageCardTemplate"; +  import UserAvatar from "../common/user/UserAvatar";  import TimelineDeleteDialog from "./TimelineDeleteDialog"; @@ -35,23 +34,14 @@ const TimelineCard: React.FC<TimelinePageCardProps> = (props) => {              </div>            </>          } -        manageArea={((): TimelineCardTemplateProps["manageArea"] => { -          if (!timeline.manageable) { -            return { type: "member" }; -          } else { -            return { -              type: "manage", -              items: [ +        manageItems={ +          timeline.manageable +            ? [                  {                    type: "button",                    text: "timeline.manageItem.property",                    onClick: () => setDialog("property"),                  }, -                { -                  type: "button", -                  onClick: () => setDialog("member"), -                  text: "timeline.manageItem.member", -                },                  { type: "divider" },                  {                    type: "button", @@ -59,10 +49,9 @@ const TimelineCard: React.FC<TimelinePageCardProps> = (props) => {                    color: "danger",                    text: "timeline.manageItem.delete",                  }, -              ], -            }; -          } -        })()} +              ] +            : undefined +        }          dialog={dialog}          setDialog={setDialog}          {...props}  | 
