修复会议详情页响应会议后toast文案"已已接受"/"已已拒绝"重复"已"字

MeetingDetail.respond()提交回应成功后用 `已${RESPONSE_LABEL[response]}` 拼toast文案,
但RESPONSE_LABEL的accepted/declined两项本身已经是"已接受"/"已拒绝"(给参与人列表
徽标用的),再拼一次"已"前缀就变成"已已接受"/"已已拒绝";tentative没有"已"前缀,
拼出来是"已待定",语义也不通顺。同页面另一个响应入口MeetingCard.respond()
早就手写了三条正确文案(已接受会议邀请/已拒绝会议邀请/已标记为待定),
两处本应一致却各写一套。

改为复用MeetingCard已有的正确文案,不再从RESPONSE_LABEL派生。

已用kcg051307发起、asn494180作为参会人的3场真实会议在浏览器逐一实测三种回应,
确认toast分别正确显示"已接受会议邀请"/"已拒绝会议邀请"/"已标记为待定"。

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Your Name
2026-09-06 13:18:19 +08:00
co-authored by Claude Sonnet 5
parent db75aaa25b
commit fa2c6c2f07
+8 -1
View File
@@ -400,8 +400,15 @@ function MeetingDetail({hashParams, onToast}) {
}; };
const respond = response => { const respond = response => {
setBusy(true); setBusy(true);
// Live-repro'd (round 14): RESPONSE_LABEL's 'accepted'/'declined' entries are already prefixed
// ("已接受"/"已拒绝") for use as the disabled-button/participant-badge label elsewhere on this
// page -- reusing it here with an extra literal "已" in front produced a toast reading "已已接受"/
// "已已拒绝" (and a slightly-off "已待定" for tentative, since that entry has no "已" to double up
// with). MeetingCard's own respond() (this same action, reached from the list card instead of this
// detail page) already had correct, un-doubled wording for all three -- reuse that instead of
// re-deriving new strings from RESPONSE_LABEL.
getMeeting(meeting.meeting_id).then(fresh => respondMeeting(fresh.meeting_id, response, fresh.version)) getMeeting(meeting.meeting_id).then(fresh => respondMeeting(fresh.meeting_id, response, fresh.version))
.then(_ => { onToast(RESPONSE_LABEL[response] ? `已${RESPONSE_LABEL[response]}` : '已回应'); load(); }) .then(_ => { onToast(response === 'accepted' ? '已接受会议邀请' : response === 'declined' ? '已拒绝会议邀请' : '已标记为待定'); load(); })
.catch(err => onToast(err.message || '操作失败')).finally(() => setBusy(false)); .catch(err => onToast(err.message || '操作失败')).finally(() => setBusy(false));
}; };