From 72cdbdba0fa35bf91bc590da6fe887ca1f96f539 Mon Sep 17 00:00:00 2001 From: hjlarry Date: Mon, 15 Sep 2025 09:20:06 +0800 Subject: [PATCH] fix chat input style --- web/app/components/workflow/comment/input.tsx | 94 ++++++++++++++----- 1 file changed, 68 insertions(+), 26 deletions(-) diff --git a/web/app/components/workflow/comment/input.tsx b/web/app/components/workflow/comment/input.tsx index ca29876369..9487089c1d 100644 --- a/web/app/components/workflow/comment/input.tsx +++ b/web/app/components/workflow/comment/input.tsx @@ -1,6 +1,11 @@ import type { FC } from 'react' -import { memo, useCallback, useState } from 'react' -import { useTranslation } from 'react-i18next' +import { memo, useCallback, useRef, useState } from 'react' +import Textarea from 'react-textarea-autosize' +import { RiSendPlane2Fill } from '@remixicon/react' +import cn from '@/utils/classnames' +import Button from '@/app/components/base/button' +import Avatar from '@/app/components/base/avatar' +import { useAppContext } from '@/context/app-context' type CommentInputProps = { position: { x: number; y: number } @@ -9,8 +14,9 @@ type CommentInputProps = { } export const CommentInput: FC = memo(({ position, onSubmit, onCancel }) => { - const { t } = useTranslation() const [content, setContent] = useState('') + const textareaRef = useRef(null) + const { userProfile } = useAppContext() const handleSubmit = useCallback(() => { try { @@ -36,35 +42,71 @@ export const CommentInput: FC = memo(({ position, onSubmit, o return (
-