From bd80c13421e1c69bcbd7bcaa75c69f1af4d22a71 Mon Sep 17 00:00:00 2001 From: zhb <50901800+zhbdesign@users.noreply.github.com> Date: Sun, 28 Jun 2026 02:01:51 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=9F=A5=E7=9C=8B=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=9B=B4=E6=96=B0=E6=97=B6=E9=97=B4=E5=8F=98=E5=8C=96?= =?UTF-8?q?=EF=BC=8C=E6=B6=88=E6=81=AF=E6=97=B6=E9=97=B4=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E6=9C=88=E6=97=A5=E6=97=B6=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复查看更新更新时间变化,消息时间显示月日时分 --- desktop/src/components/chat/MessageActionBar.tsx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/desktop/src/components/chat/MessageActionBar.tsx b/desktop/src/components/chat/MessageActionBar.tsx index 4d39c377..7a8b0b1e 100644 --- a/desktop/src/components/chat/MessageActionBar.tsx +++ b/desktop/src/components/chat/MessageActionBar.tsx @@ -1,7 +1,6 @@ import { Check, Copy, GitFork } from 'lucide-react' -import { useTranslation } from '../../i18n' import { useSettingsStore } from '../../stores/settingsStore' -import { formatExactMessageTimestamp, formatMessageTimestamp } from '../../lib/formatMessageTimestamp' +import { formatExactMessageTimestamp, formatMessageHoverTime } from '../../lib/formatMessageTimestamp' import { CopyButton } from '../shared/CopyButton' export type MessageBranchAction = { @@ -25,11 +24,10 @@ export function MessageActionBar({ align = 'start', timestamp, }: Props) { - const t = useTranslation() const locale = useSettingsStore((state) => state.locale) const hasCopy = Boolean(copyText?.trim()) - const timeLabel = typeof timestamp === 'number' - ? formatMessageTimestamp(timestamp, t, locale) + const hoverTimeLabel = typeof timestamp === 'number' + ? formatMessageHoverTime(timestamp, locale) : '' const exactTimeLabel = typeof timestamp === 'number' ? formatExactMessageTimestamp(timestamp, locale) @@ -69,12 +67,12 @@ export function MessageActionBar({