Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support split emotion cdn #592

Merged
merged 3 commits into from
Sep 11, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/client/utils/i18n/i18n.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,11 +364,11 @@ export default {
`Аватар тўлдирувчиси. Стандарт: «идентификатор». Қуйидагилардан танланг: ${defaultGravatar.join(', ')}`
],
[S.ACI + '_EMOTION_CDN']: [
'表情 CDN,默认为:https://owo.imaegoo.com/owo.json',
'表情 CDN,預設為:https://owo.imaegoo.com/owo.json',
'表情 CDN 來源,預設為:https://owo.imaegoo.com/owo.json',
'Emotion CDN. Default: https://owo.imaegoo.com/owo.json',
'Emotion CDN. Default: https://owo.imaegoo.com/owo.json'
'表情 CDN,默认为:https://owo.imaegoo.com/owo.json。英文逗号分隔。',
imaegoo marked this conversation as resolved.
Show resolved Hide resolved
'表情 CDN,預設為:https://owo.imaegoo.com/owo.json。英文逗號分隔。',
'表情 CDN 來源,預設為:https://owo.imaegoo.com/owo.json。使用英文逗號分隔。',
'Emotion CDN. Default: https://owo.imaegoo.com/owo.json. Separate by comma.',
'Emotion CDN. Default: https://owo.imaegoo.com/owo.json. Вергул билан ажратинг.'
],
[S.ACI + '_FORBIDDEN_WORDS']: [
'违禁词配置,包含违禁词的内容会直接标记为垃圾评论。英文逗号分隔。',
Expand Down
7 changes: 6 additions & 1 deletion src/client/view/components/TkSubmit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,12 @@ export default {
},
async initOwo () {
if (this.config.SHOW_EMOTION === 'true') {
const odata = await initOwoEmotion(this.config.EMOTION_CDN || 'https://owo.imaegoo.com/owo.json')
const emotion_cdn = this.config.EMOTION_CDN || 'https://owo.imaegoo.com/owo.json'
imaegoo marked this conversation as resolved.
Show resolved Hide resolved
const odata = {}
emotion_cdn.split(',').forEach((url) => {
imaegoo marked this conversation as resolved.
Show resolved Hide resolved
const sub_odata = await initOwoEmotion(url.trim())
imaegoo marked this conversation as resolved.
Show resolved Hide resolved
Object.assign(odata, sub_odata)
})
this.owo = new OwO({
logo: iconEmotion, // OwO button text, default: `OωO表情`
container: this.$refs.owo, // OwO container, default: `document.getElementsByClassName('OwO')[0]`
Expand Down