artalk 2.2.6 → 2.2.7
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 +13 -3
- package/dist/Artalk.iife.js +1 -1
- package/dist/Artalk.js +1 -1
- package/package.json +1 -1
- package/src/api/index.ts +17 -1
- package/src/artalk.ts +2 -2
- package/src/components/comment.ts +1 -1
- package/src/components/editor-plugs/emoticons-plug.ts +2 -2
- package/src/components/editor-plugs/preview-plug.ts +1 -1
- package/src/components/editor.ts +1 -1
- package/src/components/list-lite.ts +4 -1
- package/src/components/list.ts +1 -1
- package/src/components/sidebar-layer.ts +2 -2
- package/src/context.ts +1 -1
- package/src/lib/checker/index.ts +1 -1
package/dist/Artalk.es.js
CHANGED
|
@@ -1123,7 +1123,7 @@ function mangle(text) {
|
|
|
1123
1123
|
class Lexer {
|
|
1124
1124
|
constructor(options) {
|
|
1125
1125
|
this.tokens = [];
|
|
1126
|
-
this.tokens.links = Object.create(null);
|
|
1126
|
+
this.tokens.links = /* @__PURE__ */ Object.create(null);
|
|
1127
1127
|
this.options = options || defaults$2;
|
|
1128
1128
|
this.options.tokenizer = this.options.tokenizer || new Tokenizer();
|
|
1129
1129
|
this.tokenizer = this.options.tokenizer;
|
|
@@ -3452,6 +3452,14 @@ class Api {
|
|
|
3452
3452
|
return data || { is_pass: false };
|
|
3453
3453
|
});
|
|
3454
3454
|
}
|
|
3455
|
+
cacheFlushAll() {
|
|
3456
|
+
const params = { flush_all: true };
|
|
3457
|
+
return POST(this.ctx, `${this.baseURL}/admin/cache-flush`, params);
|
|
3458
|
+
}
|
|
3459
|
+
cacheWarmUp() {
|
|
3460
|
+
const params = {};
|
|
3461
|
+
return POST(this.ctx, `${this.baseURL}/admin/cache-warm`, params);
|
|
3462
|
+
}
|
|
3455
3463
|
}
|
|
3456
3464
|
const CaptchaChecker = {
|
|
3457
3465
|
request(that, ctx, inputVal) {
|
|
@@ -5375,6 +5383,8 @@ class ListLite extends Component {
|
|
|
5375
5383
|
<div class="atk-list-comments-wrap"></div>
|
|
5376
5384
|
</div>`);
|
|
5377
5385
|
this.$commentsWrap = this.$el.querySelector(".atk-list-comments-wrap");
|
|
5386
|
+
if (ctx.conf.noComment)
|
|
5387
|
+
this.noCommentText = ctx.conf.noComment;
|
|
5378
5388
|
window.setInterval(() => {
|
|
5379
5389
|
this.$el.querySelectorAll("[data-atk-comment-date]").forEach((el) => {
|
|
5380
5390
|
const date = el.getAttribute("data-atk-comment-date");
|
|
@@ -5437,7 +5447,7 @@ class ListLite extends Component {
|
|
|
5437
5447
|
}
|
|
5438
5448
|
this.data = data;
|
|
5439
5449
|
const feMinVersion = ((_a = data.api_version) == null ? void 0 : _a.fe_min_version) || "0.0.0";
|
|
5440
|
-
if (this.ctx.conf.versionCheck && this.versionCheck("\u524D\u7AEF", feMinVersion, "2.2.
|
|
5450
|
+
if (this.ctx.conf.versionCheck && this.versionCheck("\u524D\u7AEF", feMinVersion, "2.2.7"))
|
|
5441
5451
|
return;
|
|
5442
5452
|
if (this.ctx.conf.versionCheck && this.versionCheck("\u540E\u7AEF", backendMinVersion, (_b = data.api_version) == null ? void 0 : _b.version))
|
|
5443
5453
|
return;
|
|
@@ -5769,7 +5779,7 @@ class List extends ListLite {
|
|
|
5769
5779
|
if (this.ctx.conf.listSort) {
|
|
5770
5780
|
this.initDropdown();
|
|
5771
5781
|
}
|
|
5772
|
-
this.$el.querySelector(".atk-copyright").innerHTML = `Powered By <a href="https://artalk.js.org" target="_blank" title="Artalk v${"2.2.
|
|
5782
|
+
this.$el.querySelector(".atk-copyright").innerHTML = `Powered By <a href="https://artalk.js.org" target="_blank" title="Artalk v${"2.2.7"}">Artalk</a>`;
|
|
5773
5783
|
this.ctx.on("list-reload", () => this.fetchComments(0));
|
|
5774
5784
|
this.ctx.on("list-refresh-ui", () => this.refreshUI());
|
|
5775
5785
|
this.ctx.on("list-import", (data) => this.importComments(data));
|