From c45f64f4eb296f07f2fa208c9754f040156fec52 Mon Sep 17 00:00:00 2001 From: Etherrreal <65111206+lifeafter619@users.noreply.github.com> Date: Thu, 29 Dec 2022 10:57:50 +0800 Subject: [PATCH 1/4] Update WalineComponent.js --- components/WalineComponent.js | 51 ++++++++++++++++++++++++++++++++++- 1 file changed, 50 insertions(+), 1 deletion(-) diff --git a/components/WalineComponent.js b/components/WalineComponent.js index 22d6ceee..75f5ec2f 100644 --- a/components/WalineComponent.js +++ b/components/WalineComponent.js @@ -20,6 +20,50 @@ const WalineComponent = (props) => { waline.update(props) } } + const locale = { + nick: '昵称', + nickError: '昵称不能少于3个字符', + mail: '邮箱', + mailError: '请填写正确的邮件地址', + link: '网址', + optional: '可选', + placeholder: '欢迎评论', + sofa: '来发评论吧~', + submit: '提交', + like: '喜欢', + cancelLike: '取消喜欢', + reply: '回复~', + cancelReply: '取消回复', + comment: '评论', + refresh: '刷新', + more: '加载更多...', + preview: '预览', + emoji: '表情', + uploadImage: '上传图片', + seconds: '秒前', + minutes: '分钟前', + hours: '小时前', + days: '天前', + now: '刚刚', + uploading: '正在上传', + login: '登录', + logout: '退出', + admin: '博主', + sticky: '置顶', + word: '字', + wordHint: '评论字数应在 $0 到 $1 字之间!\n当前字数:$2', + anonymous: '匿名', + gif: '表情包', + profile: '个人资料', + approved: '通过', + waiting: '待审核', + spam: '垃圾', + unsticky: '取消置顶', + oldest: '按倒序', + latest: '按正序', + hottest: '按热度', + reactionTitle: '你认为这篇文章怎么样?' + } React.useEffect(() => { if (!waline) { @@ -28,7 +72,12 @@ const WalineComponent = (props) => { el: containerRef.current, serverURL: BLOG.COMMENT_WALINE_SERVER_URL, lang: BLOG.lang, - reaction: true + reaction: true, + emoji: [ + '//npm.elemecdn.com/@waline/emojis@1.1.0/tieba', + '//npm.elemecdn.com/@waline/emojis@1.1.0/weibo', + '//npm.elemecdn.com/@waline/emojis@1.1.0/bilibili' + ] }) } From a5f2da84dc069ff716e084b0049a6eb6ce4ef5d7 Mon Sep 17 00:00:00 2001 From: Etherrreal <65111206+lifeafter619@users.noreply.github.com> Date: Thu, 29 Dec 2022 11:02:59 +0800 Subject: [PATCH 2/4] Update .eslintrc.js --- .eslintrc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.js b/.eslintrc.js index 4b95adcd..6751e7c3 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -29,6 +29,7 @@ module.exports = { 'react/prop-types': 'off', 'space-before-function-paren': 0, 'react-hooks/rules-of-hooks': 'error' // Checks rules of Hooks + 'no-unused-vars': "off" }, globals: { React: true From dd3860633d537726f8d2766d528d58c1049b3ef3 Mon Sep 17 00:00:00 2001 From: Etherrreal <65111206+lifeafter619@users.noreply.github.com> Date: Thu, 29 Dec 2022 11:08:20 +0800 Subject: [PATCH 3/4] Update .eslintrc.js --- .eslintrc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.js b/.eslintrc.js index 6751e7c3..f5a9a1b6 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -28,7 +28,7 @@ module.exports = { rules: { 'react/prop-types': 'off', 'space-before-function-paren': 0, - 'react-hooks/rules-of-hooks': 'error' // Checks rules of Hooks + 'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks 'no-unused-vars': "off" }, globals: { From c8e2ad5fe3a76be164e19bac24d30901c121b908 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Thu, 29 Dec 2022 20:19:29 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E6=9B=B4=E5=A4=9A=E7=9A=84emoji?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .eslintrc.js | 3 +-- components/WalineComponent.js | 44 ----------------------------------- 2 files changed, 1 insertion(+), 46 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index f5a9a1b6..4b95adcd 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -28,8 +28,7 @@ module.exports = { rules: { 'react/prop-types': 'off', 'space-before-function-paren': 0, - 'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks - 'no-unused-vars': "off" + 'react-hooks/rules-of-hooks': 'error' // Checks rules of Hooks }, globals: { React: true diff --git a/components/WalineComponent.js b/components/WalineComponent.js index 75f5ec2f..7ddc00ee 100644 --- a/components/WalineComponent.js +++ b/components/WalineComponent.js @@ -20,50 +20,6 @@ const WalineComponent = (props) => { waline.update(props) } } - const locale = { - nick: '昵称', - nickError: '昵称不能少于3个字符', - mail: '邮箱', - mailError: '请填写正确的邮件地址', - link: '网址', - optional: '可选', - placeholder: '欢迎评论', - sofa: '来发评论吧~', - submit: '提交', - like: '喜欢', - cancelLike: '取消喜欢', - reply: '回复~', - cancelReply: '取消回复', - comment: '评论', - refresh: '刷新', - more: '加载更多...', - preview: '预览', - emoji: '表情', - uploadImage: '上传图片', - seconds: '秒前', - minutes: '分钟前', - hours: '小时前', - days: '天前', - now: '刚刚', - uploading: '正在上传', - login: '登录', - logout: '退出', - admin: '博主', - sticky: '置顶', - word: '字', - wordHint: '评论字数应在 $0 到 $1 字之间!\n当前字数:$2', - anonymous: '匿名', - gif: '表情包', - profile: '个人资料', - approved: '通过', - waiting: '待审核', - spam: '垃圾', - unsticky: '取消置顶', - oldest: '按倒序', - latest: '按正序', - hottest: '按热度', - reactionTitle: '你认为这篇文章怎么样?' - } React.useEffect(() => { if (!waline) {