💄 Upgrade the waline version to support emoji click for article.
This commit is contained in:
parent
dd8ffbb179
commit
1208213476
17
assets/js/third-party/comments/waline.js
vendored
17
assets/js/third-party/comments/waline.js
vendored
@ -10,9 +10,13 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
imguploader,
|
imguploader,
|
||||||
pageview,
|
pageview,
|
||||||
placeholder,
|
placeholder,
|
||||||
|
sofa,
|
||||||
requiredmeta,
|
requiredmeta,
|
||||||
serverurl,
|
serverurl,
|
||||||
wordlimit
|
wordlimit,
|
||||||
|
reaction,
|
||||||
|
reactiontext,
|
||||||
|
reactiontitle
|
||||||
} = NexT.CONFIG.waline.cfg;
|
} = NexT.CONFIG.waline.cfg;
|
||||||
|
|
||||||
|
|
||||||
@ -21,10 +25,16 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
|
|
||||||
const waline_js = NexT.utils.getCDNResource(NexT.CONFIG.waline.js);
|
const waline_js = NexT.utils.getCDNResource(NexT.CONFIG.waline.js);
|
||||||
|
|
||||||
const locale = {
|
let locale = {
|
||||||
placeholder: placeholder
|
placeholder : placeholder,
|
||||||
|
sofa : sofa,
|
||||||
|
reactionTitle : reactiontitle
|
||||||
};
|
};
|
||||||
|
|
||||||
|
reactiontext.forEach(function(value, index){
|
||||||
|
locale['reaction'+index] = value;
|
||||||
|
});
|
||||||
|
|
||||||
NexT.utils.loadComments(element)
|
NexT.utils.loadComments(element)
|
||||||
.then(() => NexT.utils.getScript(waline_js, {
|
.then(() => NexT.utils.getScript(waline_js, {
|
||||||
}))
|
}))
|
||||||
@ -38,6 +48,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
|||||||
imageUploader : imguploader,
|
imageUploader : imguploader,
|
||||||
wordLimit : wordlimit,
|
wordLimit : wordlimit,
|
||||||
requiredMeta : requiredmeta,
|
requiredMeta : requiredmeta,
|
||||||
|
reaction : reaction,
|
||||||
serverURL : serverurl,
|
serverURL : serverurl,
|
||||||
lang : NexT.CONFIG.lang,
|
lang : NexT.CONFIG.lang,
|
||||||
dark : 'html[data-theme="dark"]'
|
dark : 'html[data-theme="dark"]'
|
||||||
|
@ -44,12 +44,12 @@ addthis:
|
|||||||
waline:
|
waline:
|
||||||
js:
|
js:
|
||||||
name: '@waline/client'
|
name: '@waline/client'
|
||||||
version: 2.6.3
|
version: 2.11.3
|
||||||
file: dist/waline.js
|
file: dist/waline.js
|
||||||
alias: waline
|
alias: waline
|
||||||
css:
|
css:
|
||||||
name: '@waline/client'
|
name: '@waline/client'
|
||||||
version: 2.6.3
|
version: 2.11.3
|
||||||
file: dist/waline.css
|
file: dist/waline.css
|
||||||
alias: waline
|
alias: waline
|
||||||
|
|
||||||
|
@ -807,12 +807,16 @@ params:
|
|||||||
# Waline comments system
|
# Waline comments system
|
||||||
# More info seee: https://waline.js.org/
|
# More info seee: https://waline.js.org/
|
||||||
waline:
|
waline:
|
||||||
pageView: true
|
pageView: '#waline-pageview-count'
|
||||||
placeholder: "请文明发言"
|
placeholder: "请文明发言哟 ヾ(≧▽≦*)o"
|
||||||
|
sofa: "快来发表你的意见吧 (≧∀≦)ゞ"
|
||||||
emoji: false
|
emoji: false
|
||||||
imgUploader: false
|
imgUploader: false
|
||||||
wordLimit: 200
|
wordLimit: 200
|
||||||
requiredMeta: ['nick', 'mail']
|
requiredMeta: ['nick', 'mail']
|
||||||
|
reaction: true
|
||||||
|
reactionText: [ '点赞', '踩一下', '得意', '不屑', '尴尬', '睡觉']
|
||||||
|
reactionTitle: "你认为这篇文章怎么样?"
|
||||||
serverURL: #<your waline server url>
|
serverURL: #<your waline server url>
|
||||||
|
|
||||||
# Artalk 评论插件
|
# Artalk 评论插件
|
||||||
|
Loading…
Reference in New Issue
Block a user