artalk 2.2.10 → 2.2.11
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 +7 -5
- package/dist/Artalk.iife.js +1 -1
- package/dist/Artalk.js +1 -1
- package/package.json +1 -1
- package/src/components/list-lite.ts +4 -1
- package/src/defaults.ts +4 -2
- package/types/artalk-config.d.ts +3 -0
package/dist/Artalk.es.js
CHANGED
|
@@ -97,14 +97,15 @@ const defaults$3 = {
|
|
|
97
97
|
sendBtn: "\u53D1\u9001\u8BC4\u8BBA",
|
|
98
98
|
darkMode: false,
|
|
99
99
|
editorTravel: true,
|
|
100
|
+
flatMode: "auto",
|
|
101
|
+
nestMax: 2,
|
|
102
|
+
nestSort: "DATE_ASC",
|
|
100
103
|
emoticons: "https://cdn.jsdelivr.net/gh/ArtalkJS/Emoticons/grps/default.json",
|
|
101
104
|
vote: true,
|
|
102
105
|
voteDown: false,
|
|
103
106
|
uaBadge: true,
|
|
104
107
|
listSort: true,
|
|
105
108
|
pvEl: "#ArtalkPV",
|
|
106
|
-
flatMode: "auto",
|
|
107
|
-
nestMax: 2,
|
|
108
109
|
gravatar: {
|
|
109
110
|
default: "mp",
|
|
110
111
|
mirror: "https://sdn.geekzu.org/avatar/"
|
|
@@ -5499,7 +5500,7 @@ class ListLite extends Component {
|
|
|
5499
5500
|
__publicField(this, "isLoading", false);
|
|
5500
5501
|
__publicField(this, "noCommentText", "\u65E0\u5185\u5BB9");
|
|
5501
5502
|
__publicField(this, "flatMode", false);
|
|
5502
|
-
__publicField(this, "nestSortBy"
|
|
5503
|
+
__publicField(this, "nestSortBy");
|
|
5503
5504
|
__publicField(this, "pageMode", "pagination");
|
|
5504
5505
|
__publicField(this, "pageSize", 20);
|
|
5505
5506
|
__publicField(this, "scrollListenerAt");
|
|
@@ -5518,6 +5519,7 @@ class ListLite extends Component {
|
|
|
5518
5519
|
this.$commentsWrap = this.$el.querySelector(".atk-list-comments-wrap");
|
|
5519
5520
|
if (ctx.conf.noComment)
|
|
5520
5521
|
this.noCommentText = ctx.conf.noComment;
|
|
5522
|
+
this.nestSortBy = this.ctx.conf.nestSort || "DATE_ASC";
|
|
5521
5523
|
window.setInterval(() => {
|
|
5522
5524
|
this.$el.querySelectorAll("[data-atk-comment-date]").forEach((el) => {
|
|
5523
5525
|
const date = el.getAttribute("data-atk-comment-date");
|
|
@@ -5583,7 +5585,7 @@ class ListLite extends Component {
|
|
|
5583
5585
|
}
|
|
5584
5586
|
this.data = data;
|
|
5585
5587
|
const feMinVersion = ((_a = data.api_version) == null ? void 0 : _a.fe_min_version) || "0.0.0";
|
|
5586
|
-
if (this.ctx.conf.versionCheck && this.versionCheck("\u524D\u7AEF", feMinVersion, "2.2.
|
|
5588
|
+
if (this.ctx.conf.versionCheck && this.versionCheck("\u524D\u7AEF", feMinVersion, "2.2.11"))
|
|
5587
5589
|
return;
|
|
5588
5590
|
if (this.ctx.conf.versionCheck && this.versionCheck("\u540E\u7AEF", backendMinVersion, (_b = data.api_version) == null ? void 0 : _b.version))
|
|
5589
5591
|
return;
|
|
@@ -5890,7 +5892,7 @@ class List extends ListLite {
|
|
|
5890
5892
|
if (this.ctx.conf.listSort) {
|
|
5891
5893
|
this.initDropdown();
|
|
5892
5894
|
}
|
|
5893
|
-
this.$el.querySelector(".atk-copyright").innerHTML = `Powered By <a href="https://artalk.js.org" target="_blank" title="Artalk v${"2.2.
|
|
5895
|
+
this.$el.querySelector(".atk-copyright").innerHTML = `Powered By <a href="https://artalk.js.org" target="_blank" title="Artalk v${"2.2.11"}">Artalk</a>`;
|
|
5894
5896
|
this.ctx.on("list-reload", () => this.fetchComments(0));
|
|
5895
5897
|
this.ctx.on("list-refresh-ui", () => this.refreshUI());
|
|
5896
5898
|
this.ctx.on("list-import", (data) => this.importComments(data));
|