💄 Upgrade the waline version to support emoji click for article.

This commit is contained in:
凡梦星尘 2022-10-01 18:21:35 +08:00
parent dd8ffbb179
commit 1208213476
3 changed files with 22 additions and 7 deletions

View File

@ -10,9 +10,13 @@ document.addEventListener('DOMContentLoaded', () => {
imguploader,
pageview,
placeholder,
sofa,
requiredmeta,
serverurl,
wordlimit
wordlimit,
reaction,
reactiontext,
reactiontitle
} = NexT.CONFIG.waline.cfg;
@ -21,10 +25,16 @@ document.addEventListener('DOMContentLoaded', () => {
const waline_js = NexT.utils.getCDNResource(NexT.CONFIG.waline.js);
const locale = {
placeholder: placeholder
let locale = {
placeholder : placeholder,
sofa : sofa,
reactionTitle : reactiontitle
};
reactiontext.forEach(function(value, index){
locale['reaction'+index] = value;
});
NexT.utils.loadComments(element)
.then(() => NexT.utils.getScript(waline_js, {
}))
@ -38,6 +48,7 @@ document.addEventListener('DOMContentLoaded', () => {
imageUploader : imguploader,
wordLimit : wordlimit,
requiredMeta : requiredmeta,
reaction : reaction,
serverURL : serverurl,
lang : NexT.CONFIG.lang,
dark : 'html[data-theme="dark"]'

View File

@ -44,12 +44,12 @@ addthis:
waline:
js:
name: '@waline/client'
version: 2.6.3
version: 2.11.3
file: dist/waline.js
alias: waline
css:
name: '@waline/client'
version: 2.6.3
version: 2.11.3
file: dist/waline.css
alias: waline

View File

@ -807,12 +807,16 @@ params:
# Waline comments system
# More info seee: https://waline.js.org/
waline:
pageView: true
placeholder: "请文明发言"
pageView: '#waline-pageview-count'
placeholder: "请文明发言哟 ヾ(≧▽≦*)o"
sofa: "快来发表你的意见吧 (≧∀≦)ゞ"
emoji: false
imgUploader: false
wordLimit: 200
requiredMeta: ['nick', 'mail']
reaction: true
reactionText: [ '点赞', '踩一下', '得意', '不屑', '尴尬', '睡觉']
reactionTitle: "你认为这篇文章怎么样?"
serverURL: #<your waline server url>
# Artalk 评论插件