diff --git a/internal/web/actions/default/users/user.go b/internal/web/actions/default/users/user.go index 86547c44..52e59244 100644 --- a/internal/web/actions/default/users/user.go +++ b/internal/web/actions/default/users/user.go @@ -97,6 +97,7 @@ func (this *UserAction) RunGet(params struct { "username": user.Username, "fullname": user.Fullname, "email": user.Email, + "verifiedEmail": user.VerifiedEmail, "tel": user.Tel, "remark": user.Remark, "mobile": user.Mobile, diff --git a/web/public/js/components/senders/email-sender.js b/web/public/js/components/senders/email-sender.js new file mode 100644 index 00000000..5cd115df --- /dev/null +++ b/web/public/js/components/senders/email-sender.js @@ -0,0 +1,102 @@ +Vue.component("email-sender", { + props: ["value", "name"], + data: function () { + let value = this.value + if (value == null) { + value = { + isOn: false, + smtpHost: "", + smtpPort: 0, + username: "", + password: "", + fromEmail: "", + fromName: "" + } + } + let smtpPortString = value.smtpPort.toString() + if (smtpPortString == "0") { + smtpPortString = "" + } + + return { + config: value, + smtpPortString: smtpPortString + } + }, + watch: { + smtpPortString: function (v) { + let port = parseInt(v) + if (!isNaN(port)) { + this.config.smtpPort = port + } + } + }, + methods: { + test: function () { + window.TESTING_EMAIL_CONFIG = this.config + teaweb.popup("/users/setting/emailTest", { + height: "36em" + }) + } + }, + template: `
| 启用 | +|
| SMTP地址 * | +
+
+ SMTP主机地址,比如 |
+
| SMTP端口 * | +
+
+ SMTP主机端口,比如 |
+
| 用户名 * | +
+
+ 通常为发件人邮箱地址。 + |
+
| 密码 * | +
+
+ 邮箱登录密码或授权码,如不清楚,请查询对应邮件服务商文档。。 + |
+
| 发件人Email * | +
+
+ 使用的发件人邮箱地址,通常和发件用户名一致。 + |
+
| 发件人名称 | +
+
+ 使用的发件人名称,默认使用系统设置的产品名称。 + |
+
| 发送测试 | +[点此测试] | +