artalk 2.3.1 → 2.3.4
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.css +1 -1
- package/dist/Artalk.es.js +196 -63
- package/dist/Artalk.iife.js +1 -1
- package/dist/Artalk.js +1 -1
- package/dist/ArtalkLite.css +1 -1
- package/dist/ArtalkLite.es.js +189 -63
- package/dist/ArtalkLite.iife.js +1 -1
- package/dist/ArtalkLite.js +1 -1
- package/package.json +3 -3
- package/src/api/index.ts +7 -2
- package/src/api/request.ts +12 -8
- package/src/artalk.ts +26 -31
- package/src/comment/render.ts +24 -14
- package/src/context.ts +39 -0
- package/src/editor/editor.ts +110 -15
- package/src/editor/plugs/emoticons-plug.ts +2 -2
- package/src/editor/plugs/upload-plug.ts +1 -1
- package/src/i18n/en.ts +3 -0
- package/src/i18n/zh-CN.ts +5 -2
- package/src/lib/ui.ts +3 -2
- package/src/list/list-lite.ts +8 -0
- package/src/style/comment.less +2 -3
- package/test/CSRF.html +26 -0
- package/types/artalk-config.d.ts +1 -1
- package/types/artalk-data.d.ts +3 -0
- package/types/context.d.ts +15 -0
package/types/context.d.ts
CHANGED
|
@@ -63,18 +63,30 @@ export default interface ContextApi {
|
|
|
63
63
|
/** 插入评论 */
|
|
64
64
|
insertComment(commentData: CommentData): void
|
|
65
65
|
|
|
66
|
+
/** 更新评论 */
|
|
67
|
+
updateComment(commentData: CommentData): void
|
|
68
|
+
|
|
66
69
|
/** 评论回复 */
|
|
67
70
|
replyComment(commentData: CommentData, $comment: HTMLElement, scroll?: boolean): void
|
|
68
71
|
|
|
69
72
|
/** 取消回复评论 */
|
|
70
73
|
cancelReplyComment(): void
|
|
71
74
|
|
|
75
|
+
/** 编辑评论 */
|
|
76
|
+
editComment(commentData: CommentData, $comment: HTMLElement): void
|
|
77
|
+
|
|
78
|
+
/** 取消编辑评论 */
|
|
79
|
+
cancelEditComment(): void
|
|
80
|
+
|
|
72
81
|
/** 更新通知数据 */
|
|
73
82
|
updateNotifies(notifies: NotifyData[]): void
|
|
74
83
|
|
|
75
84
|
/** 列表 - 重新加载数据 */
|
|
76
85
|
listReload(): void
|
|
77
86
|
|
|
87
|
+
/** 列表 - 重新加载数据 (别名) */
|
|
88
|
+
reload(): void
|
|
89
|
+
|
|
78
90
|
/** 列表 - UI 更新 */
|
|
79
91
|
listRefreshUI(): void
|
|
80
92
|
|
|
@@ -125,4 +137,7 @@ export default interface ContextApi {
|
|
|
125
137
|
|
|
126
138
|
/** i18n 翻译 */
|
|
127
139
|
$t(key: keyof I18n, args?: {[key: string]: string}): string
|
|
140
|
+
|
|
141
|
+
/** 设置暗黑模式 */
|
|
142
|
+
setDarkMode(darkMode: boolean): void
|
|
128
143
|
}
|