Skip to content

feat(web): Email 渠道 SMTP 配置表单 (ONE-22) - #134

Closed
mapxn wants to merge 1 commit into
mainfrom
agent/mary/6f34ccafd369
Closed

mapxn wants to merge 1 commit into
mainfrom
agent/mary/6f34ccafd369

Conversation

@mapxn

@mapxn mapxn commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

ONE-22 前端:Email 渠道 SMTP 配置表单

后端(Daniel)并行开发,本 PR 只改前端,字段名按冻结契约:smtp_host、smtp_port、smtp_username、smtp_password、smtp_from,原有 to 保留。

改动

  • web/src/pages/channels/ChannelPage.tsx
    • Email 渠道 fields 新增 5 个字段(smtp_password 为 password,smtp_port placeholder 465,smtp_from placeholder noreply@example.com)。
    • ChannelFieldDef 新增可选 labelKey,渲染时优先走 i18n;Email 卡片的 6 个 label 全部走 i18n(to 复用已有 channels.toAddress),避免中英混排。其他渠道标签未改动。
  • web/src/locales/{zh,en}.json:channels.smtpHost / smtpPort / smtpUsername / smtpPassword / smtpFrom。

无新增依赖,无视觉风格变更(沿用现有字段堆叠布局与输入框样式)。

验证

  • web build(tsc -b && vite build)通过。
  • biome lint . 与 HEAD 基线一致(2 warnings + 1 info,全部在 worker/src/routes/items.ts 等既有文件,本次未新增)。
  • 浏览器手测(临时 harness,已删除):5 个字段正常渲染并可编辑保存,PUT /me/notifications 载荷含全部 5 个 smtp_* 字段;密码回显/提交均为 ••••••。

Add smtp_host / smtp_port / smtp_username / smtp_password / smtp_from to
the Email channel form, wire zh/en labels through a new optional
labelKey on ChannelFieldDef, and keep smtp_password as a password input
so the backend-masked value round-trips unchanged.
@mapxn

mapxn commented Oct 22, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #136 (ONE-26). ONE-22 cancelled as duplicate of ONE-26.

@mapxn mapxn closed this Oct 22, 2026
@mapxn
mapxn deleted the agent/mary/6f34ccafd369 branch November 8, 2026 11:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant