artalk 2.5.4 → 2.5.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Artalk.es.js +47 -21
- package/dist/Artalk.iife.js +1 -1
- package/dist/Artalk.js +1 -1
- package/dist/ArtalkLite.es.js +16 -16
- package/dist/ArtalkLite.iife.js +1 -1
- package/dist/ArtalkLite.js +1 -1
- package/dist/types/artalk-config.d.ts +3 -3
- package/package.json +3 -3
- package/src/defaults.ts +1 -1
- package/src/editor/submit.ts +4 -4
- package/src/lib/utils.ts +2 -1
- package/types/artalk-config.d.ts +3 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "artalk",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.5",
|
|
4
4
|
"license": "LGPL-3.0",
|
|
5
5
|
"description": "A Selfhosted Comment System",
|
|
6
6
|
"keywords": [
|
|
@@ -23,13 +23,13 @@
|
|
|
23
23
|
"module": "./dist/Artalk.es.js",
|
|
24
24
|
"types": "./dist/src/main.d.ts",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@types/marked": "4.0
|
|
26
|
+
"@types/marked": "4.3.0"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"abortcontroller-polyfill": "^1.7.5",
|
|
30
30
|
"hanabi": "^0.4.0",
|
|
31
31
|
"insane": "^2.6.2",
|
|
32
|
-
"marked": "^
|
|
32
|
+
"marked": "^5.0.1"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"dev": "vite",
|
package/src/defaults.ts
CHANGED
package/src/editor/submit.ts
CHANGED
|
@@ -48,13 +48,13 @@ async function Do(m: SubmitManager) {
|
|
|
48
48
|
// submit error
|
|
49
49
|
console.error(err)
|
|
50
50
|
m.editor.showNotify(`${m.editor.$t('commentFail')},${err.msg || String(err)}`, 'e')
|
|
51
|
+
return
|
|
52
|
+
} finally {
|
|
53
|
+
m.editor.hideLoading()
|
|
51
54
|
}
|
|
52
55
|
|
|
53
|
-
// 复原编辑器
|
|
54
|
-
m.editor.reset()
|
|
55
|
-
|
|
56
|
+
m.editor.reset() // 复原编辑器
|
|
56
57
|
m.editor.ctx.trigger('editor-submitted')
|
|
57
|
-
m.editor.hideLoading()
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
interface CustomSubmit {
|
package/src/lib/utils.ts
CHANGED
|
@@ -116,7 +116,8 @@ export function onImagesLoaded($container: HTMLElement, event: Function) {
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
export function getGravatarURL(ctx: Context, emailMD5: string) {
|
|
119
|
-
|
|
119
|
+
const { mirror, params } = ctx.conf.gravatar
|
|
120
|
+
return `${mirror.replace(/\/$/, '')}/${emailMD5}?${params.replace(/^\?/, '')}`
|
|
120
121
|
}
|
|
121
122
|
|
|
122
123
|
export function sleep(ms: number) {
|
package/types/artalk-config.d.ts
CHANGED