%s
%s
%s
返回邮箱diff --git a/.github/release-notes/v1.2.23.md b/.github/release-notes/v1.2.23.md new file mode 100644 index 0000000..a52fbdb --- /dev/null +++ b/.github/release-notes/v1.2.23.md @@ -0,0 +1,5 @@ +- 优化转发验证完成页:移除“返回邮箱”入口,外部收件人确认 Netflix、ChatGPT 等验证码转发授权后不会进入邮箱登录页,只显示验证结果和关闭页面提示。 +- 合并验证邮箱搜索与添加入口:输入内容会实时筛选已添加地址,输入新邮箱时可直接发送验证邮件,已存在地址会明确显示为“已添加”。 +- 重整验证邮箱管理列表:待验证邮箱置顶展示,已验证邮箱按数字和字母排序并聚合为可折叠分组,邮箱数量较多时仍便于查找和管理。 +- 精简邮件转发主页面:不再平铺全部验证邮箱标签,改为显示已验证与待验证数量汇总,点击即可进入管理列表。 +- 补充验证完成页回归测试,确保页面不再出现邮箱首页或登录入口,并完成前端构建、组件规范、后端全量测试与静态检查。 diff --git a/VERSION b/VERSION index 9a83513..a93a6f7 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.22 +1.2.23 diff --git a/apps/api/internal/app/app_test.go b/apps/api/internal/app/app_test.go index 43dde3e..0e722ac 100644 --- a/apps/api/internal/app/app_test.go +++ b/apps/api/internal/app/app_test.go @@ -2613,6 +2613,25 @@ func TestMailSendQueuesSMTPFailureForRetry(t *testing.T) { } } +func TestForwardingVerificationPageDoesNotLinkToMailbox(t *testing.T) { + a := newTestApp(t) + recorder := httptest.NewRecorder() + + a.renderForwardingVerificationPage(recorder, http.StatusOK, true, "friend@example.test", "该邮箱已通过转发验证") + body := recorder.Body.String() + if recorder.Code != http.StatusOK { + t.Fatalf("status=%d", recorder.Code) + } + for _, forbidden := range []string{`href="/"`, "返回邮箱", "登录"} { + if strings.Contains(body, forbidden) { + t.Fatalf("verification page contains forbidden navigation %q: %s", forbidden, body) + } + } + if !strings.Contains(body, "可以关闭此页面") { + t.Fatalf("verification page is missing close guidance: %s", body) + } +} + func TestInboundForwardingSettingsAndDelivery(t *testing.T) { a := newTestApp(t) stopTestWorkers(a) diff --git a/apps/api/internal/app/forwarding_handlers.go b/apps/api/internal/app/forwarding_handlers.go index b8ea04b..62ab133 100644 --- a/apps/api/internal/app/forwarding_handlers.go +++ b/apps/api/internal/app/forwarding_handlers.go @@ -165,7 +165,7 @@ func (a *App) handleVerifyForwardingEmail(w http.ResponseWriter, r *http.Request a.renderForwardingVerificationPage(w, http.StatusInternalServerError, false, email, "验证失败,请稍后重试") return } - a.renderForwardingVerificationPage(w, http.StatusOK, true, email, "验证完成,可以回到设置页选择此转发目标") + a.renderForwardingVerificationPage(w, http.StatusOK, true, email, "该邮箱已通过转发验证") } func (a *App) handleDeleteForwardingVerifiedEmail(w http.ResponseWriter, r *http.Request) { @@ -439,14 +439,18 @@ func (a *App) renderForwardingVerificationPage(w http.ResponseWriter, status int title := "邮箱转发验证" heading := "验证失败" color := "#dc2626" + statusMark := "!" + closingMessage := "请联系验证发起人重新发送链接" if ok { heading = "验证完成" - color = "#2563eb" + color = "#16a34a" + statusMark = "✓" + closingMessage = "验证结果已记录,可以关闭此页面" } w.Header().Set("Content-Type", "text/html; charset=utf-8") w.WriteHeader(status) - _, _ = fmt.Fprintf(w, `
%s
%s
返回邮箱%s
%s
%s
暂未添加验证邮箱,请先点击「管理验证邮箱」添加。
}提示:点击邮箱列表中的「转发」按钮,可在账号级目标之外追加该邮箱自己的转发目标。
@@ -1469,45 +1477,58 @@ function MailboxManagement({ -