From 741c92ff31e1f1baa0c0e9be6082b771c64d7887 Mon Sep 17 00:00:00 2001 From: crosswk Date: Wed, 29 Jul 2026 20:14:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AF=EF=BC=9A=E5=8F=8D?= =?UTF-8?q?=E9=A6=88=E6=88=90=E5=8A=9F=E6=8F=90=E7=A4=BA=E7=A7=BB=E5=88=B0?= =?UTF-8?q?=E6=B6=88=E6=81=AF=E4=BD=8D(=E4=B8=8D=E5=86=8D=E9=A2=9D?= =?UTF-8?q?=E5=A4=96=E6=92=91=E9=AB=98=E5=8D=A1=E7=89=87)=EF=BC=8C?= =?UTF-8?q?=E7=BD=91=E5=9D=80=E8=A1=A5=E5=85=A8=20/feedback.html=20?= =?UTF-8?q?=E5=90=8E=E7=BC=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/src/components/FeedbackSection.tsx | 51 +++++++++++------------ 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/client/src/components/FeedbackSection.tsx b/client/src/components/FeedbackSection.tsx index b228bfb..20c40ee 100644 --- a/client/src/components/FeedbackSection.tsx +++ b/client/src/components/FeedbackSection.tsx @@ -14,6 +14,9 @@ export default function FeedbackSection() { const [message, setMessage] = useState<{ ok: boolean; text: string } | null>(null) const [submitted, setSubmitted] = useState(false) + // 公开反馈页地址 = 用户在设置里填写的服务器地址 + /feedback.html + const feedbackUrl = `${getBackendBaseUrl()}/feedback.html` + useEffect(() => { getLastTranscript().then((record) => { if (record) { @@ -63,8 +66,7 @@ export default function FeedbackSection() { const handleOpenFeedbackPage = async () => { try { - // 公开反馈页与用户在设置里填写的服务器地址一致 - await open(`${getBackendBaseUrl()}/feedback.html`) + await open(feedbackUrl) } catch { // 打开外部浏览器失败时静默忽略,不影响反馈提交流程 } @@ -108,40 +110,37 @@ export default function FeedbackSection() { style={{ fieldSizing: 'content' as never, minHeight: '1.5rem', maxHeight: '6rem' }} /> - {/* 底部 */} -
-
- {message && ( -

- {message.text} + {/* 底部:状态提示(错误 / 成功)在左,发送按钮在右——成功提示也在此处显示,不再额外撑高卡片 */} +

+
+ {submitted ? ( +

+ 发送成功,感谢您的反馈。 + 请访问 {feedbackUrl}, +

+ ) : ( + message && ( +

+ {message.text} +

+ ) )}
- - {/* 提交成功后:成功提示 + 服务器地址 + 查看进度超链接(常驻直到重新输入) */} - {submitted && ( -
- 发送成功,感谢您的反馈。 - - 请访问 {getBackendBaseUrl()}, - - -
- )}
)