refactor: message feed

This commit is contained in:
Tristan Yang
2023-03-07 11:04:38 +08:00
parent 0aa747ee7c
commit 9b379e9561
7 changed files with 149 additions and 145 deletions
+2 -5
View File
@@ -15,10 +15,10 @@ import LicenseUpgradeTip from "./LicenseOutdatedTip";
import DnDTip from "./DnDTip";
import IconWarning from '../../../assets/icons/warning.svg';
import ImagePreview from "../../../common/component/ImagePreview";
import MessageFeed from "./MessageFeed";
interface Props {
readonly?: boolean;
children: ReactElement;
header: ReactElement;
aside?: ReactElement | null;
users?: ReactElement | null;
@@ -29,7 +29,6 @@ interface Props {
const Layout: FC<Props> = ({
readonly = false,
children,
header,
aside = null,
users = null,
@@ -97,9 +96,7 @@ const Layout: FC<Props> = ({
<div className="w-full h-full flex items-start justify-between relative" >
<div className="rounded-br-2xl flex flex-col absolute bottom-0 w-full h-full" ref={messagesContainer}>
{/* 消息流 */}
<article id={`VOCECHAT_FEED_${context}_${to}`} className="w-full h-full px-1 md:px-4 py-4.5 overflow-x-hidden overflow-y-scroll">
{children}
</article>
<MessageFeed context={context} id={to} />
{/* 发送框 */}
<div className={`px-2 py-0 md:p-4 ${selects ? "selecting" : ""}`}>
{readonly ? (