From 4b2f16d779321e9cfa819a4dbd953d1bc6a6726e Mon Sep 17 00:00:00 2001 From: noelorin Date: Sat, 26 Sep 2026 21:13:05 +0800 Subject: [PATCH] fix(web): selectMatch toast on real payload, neutral match labels --- app/web/src/components/pages/WatchBody.tsx | 8 +++++--- packages/i18n/src/messages/en.ts | 4 ++-- packages/i18n/src/messages/zh-CN.ts | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/app/web/src/components/pages/WatchBody.tsx b/app/web/src/components/pages/WatchBody.tsx index 979a4ce..6003403 100644 --- a/app/web/src/components/pages/WatchBody.tsx +++ b/app/web/src/components/pages/WatchBody.tsx @@ -416,13 +416,15 @@ function WatchInner(props: { locale: Locale; mediaItemId: string }) { { mediaItemId, episodeId }, { onSuccess: (data) => { - setMatchOpen(false); if (data.ok && data.xml) { + setMatchOpen(false); setMatchXml(data.xml); setLocalXml(""); + void openDanmaku.refetch(); + toast.success(t(locale, "watch.matchManual")); + return; } - void openDanmaku.refetch(); - toast.success(t(locale, "watch.matchManual")); + toast.error(data.message ?? t(locale, "watch.matchFailed")); }, onError: () => toast.error(t(locale, "watch.matchFailed")), }, diff --git a/packages/i18n/src/messages/en.ts b/packages/i18n/src/messages/en.ts index 2649c62..a077316 100644 --- a/packages/i18n/src/messages/en.ts +++ b/packages/i18n/src/messages/en.ts @@ -178,10 +178,10 @@ export const en: Record = { "watch.danmakuLocal": "Danmaku (local)", "watch.rematch": "Rematch", "watch.matchCandidates": "Pick episode", - "watch.matchAutoBound": "Auto-matched danmaku", + "watch.matchAutoBound": "High-confidence candidate", "watch.matchManual": "Manual match", "watch.importSaved": "Danmaku saved", - "watch.foundSameName": "Linked same-name danmaku", + "watch.foundSameName": "Same-name candidate", "watch.filterTitle": "Danmaku filters", "watch.blockKeywordAdd": "Add block word", "watch.matchFailed": "Danmaku match failed", diff --git a/packages/i18n/src/messages/zh-CN.ts b/packages/i18n/src/messages/zh-CN.ts index 3b40d0a..2879b74 100644 --- a/packages/i18n/src/messages/zh-CN.ts +++ b/packages/i18n/src/messages/zh-CN.ts @@ -173,10 +173,10 @@ export const zhCN = { "watch.danmakuLocal": "弹幕(本地)", "watch.rematch": "重新匹配", "watch.matchCandidates": "选择弹幕集", - "watch.matchAutoBound": "已自动匹配弹幕", + "watch.matchAutoBound": "高置信候选", "watch.matchManual": "手动匹配", "watch.importSaved": "弹幕已保存", - "watch.foundSameName": "发现同名弹幕,已自动关联", + "watch.foundSameName": "同名候选", "watch.filterTitle": "弹幕过滤", "watch.blockKeywordAdd": "添加屏蔽词", "watch.matchFailed": "弹幕匹配失败",