Skip to content

Commit

Permalink
feat: 增加 MAIL_SUBJECT_ADMIN 和 MAIL_TEMPLATE_ADMIN 配置
Browse files Browse the repository at this point in the history
improvement: 修改部分zh-tw 用詞
  • Loading branch information
jerryc127 authored and lizheming committed Jan 2, 2021
1 parent d1490b3 commit 7f81112
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions packages/client/src/i18n/zh-TW.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ export default {
nick: "暱稱",
mail: "郵箱",
link: "網址(http://)",
nickFail: "昵稱不能少於3個字符",
nickFail: "暱稱不能少於3個字元",
mailFail: "請填寫正確的郵件地址",
sofa: "來發評論吧~",
submit: "提交",
Expand All @@ -12,10 +12,10 @@ export default {
cancel: "取消",
confirm: "確認",
continue: "繼續",
more: "加載更多...",
more: "載入更多...",
preview: "預覽",
emoji: "表情",
expand: "查看更多...",
expand: "檢視更多...",
seconds: "秒前",
minutes: "分鐘前",
hours: "小時前",
Expand All @@ -27,7 +27,7 @@ export default {
"code-98": "Valine 初始化失敗,請檢查 av-min.js 版本",
"code-99": "Valine 初始化失敗,請檢查init中的`el`元素.",
"code-100": "Valine 初始化失敗,請檢查你的AppId和AppKey.",
"code-140": "今日 API 調用總次數已超過開發版限制.",
"code-140": "今日 API 呼叫總次數已超過開發版限制.",
"code-401": "未經授權的操作,請檢查你的AppId和AppKey.",
"code-403": "訪問被API域名白名單拒絕,請檢查你的安全域名設置."
"code-403": "訪問被API域名白名單拒絕,請檢查你的安全域名設定."
};
4 changes: 2 additions & 2 deletions packages/server/src/service/notify.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ module.exports = class extends think.Service {
const isAuthorComment = AUTHOR ? comment.mail.toLowerCase() === AUTHOR.toLowerCase() : false;
const isReplyAuthor = AUTHOR ? parent && parent.mail.toLowerCase() === AUTHOR.toLowerCase() : false;

const title = '{{site.name}} 上有新评论了';
const content = `
const title = process.env.MAIL_SUBJECT_ADMIN || '{{site.name}} 上有新评论了';
const content = process.env.MAIL_TEMPLATE_ADMIN || `
<div style="border-top:2px solid #12ADDB;box-shadow:0 1px 3px #AAAAAA;line-height:180%;padding:0 15px 12px;margin:50px auto;font-size:12px;">
<h2 style="border-bottom:1px solid #DDD;font-size:14px;font-weight:normal;padding:13px 0 10px 8px;">
您在<a style="text-decoration:none;color: #12ADDB;" href="{{site.url}}" target="_blank">{{site.name}}</a>上的文章有了新的评论
Expand Down

0 comments on commit 7f81112

Please sign in to comment.