From 12e12dff4fb83e125a47b62a2c4be335363de089 Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 13 Jan 2021 14:13:02 +0800 Subject: ... --- .../src/app/views/timeline-common/TimelineItem.tsx | 83 +++++----------------- 1 file changed, 17 insertions(+), 66 deletions(-) (limited to 'FrontEnd/src/app/views/timeline-common/TimelineItem.tsx') diff --git a/FrontEnd/src/app/views/timeline-common/TimelineItem.tsx b/FrontEnd/src/app/views/timeline-common/TimelineItem.tsx index 233c81bd..74431402 100644 --- a/FrontEnd/src/app/views/timeline-common/TimelineItem.tsx +++ b/FrontEnd/src/app/views/timeline-common/TimelineItem.tsx @@ -2,44 +2,13 @@ import React from "react"; import clsx from "clsx"; import { Link } from "react-router-dom"; import { useTranslation } from "react-i18next"; -import { Modal, Button } from "react-bootstrap"; import { useAvatar } from "@/services/user"; import { TimelinePostInfo } from "@/services/timeline"; import BlobImage from "../common/BlobImage"; - -const TimelinePostDeleteConfirmDialog: React.FC<{ - onClose: () => void; - onConfirm: () => void; -}> = ({ onClose, onConfirm }) => { - const { t } = useTranslation(); - - return ( - - - - {t("timeline.post.deleteDialog.title")} - - - {t("timeline.post.deleteDialog.prompt")} - - - - - - ); -}; +import TimelineLine from "./TimelineLine"; +import TimelinePostDeleteConfirmDialog from "./TimelinePostDeleteConfirmDialog"; export interface TimelineItemProps { post: TimelinePostInfo; @@ -50,7 +19,6 @@ export interface TimelineItemProps { onDelete: () => void; }; onClick?: () => void; - onResize?: () => void; className?: string; style?: React.CSSProperties; } @@ -60,7 +28,7 @@ const TimelineItem: React.FC = (props) => { const current = props.current === true; - const { more, onResize } = props; + const { more } = props; const avatar = useAvatar(props.post.author.username); @@ -68,31 +36,25 @@ const TimelineItem: React.FC = (props) => { return (
-
-
-
-
-
-
-
- {current &&
} -
-
+
-
+
- - {props.post.time.toLocaleString(i18n.languages)} - - {props.post.author.nickname} + + + + + + {props.post.author.nickname} + + + {props.post.time.toLocaleString(i18n.languages)} + + {more != null ? ( = (props) => { ) : null}
- - - {(() => { const { content } = props.post; if (content.type === "text") { @@ -122,7 +74,6 @@ const TimelineItem: React.FC = (props) => { } else { return ( -- cgit v1.2.3