artalk 2.2.1 → 2.2.2

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 CHANGED
@@ -4253,6 +4253,7 @@ class Editor extends Component {
4253
4253
  const $travelPlace = createElement("<div></div>");
4254
4254
  $afterEl.after($travelPlace);
4255
4255
  $travelPlace.replaceWith(this.$el);
4256
+ this.$el.classList.add("atk-fade-in");
4256
4257
  }
4257
4258
  travelBack() {
4258
4259
  var _a;
@@ -4880,7 +4881,7 @@ class Comment extends Component {
4880
4881
  });
4881
4882
  }
4882
4883
  getIsRoot() {
4883
- return this.parent === null;
4884
+ return this.data.rid === 0;
4884
4885
  }
4885
4886
  getChildren() {
4886
4887
  return this.children;
@@ -5363,7 +5364,7 @@ class ListLite extends Component {
5363
5364
  }
5364
5365
  this.data = data;
5365
5366
  const feMinVersion = ((_a = data.api_version) == null ? void 0 : _a.fe_min_version) || "0.0.0";
5366
- if (this.ctx.conf.versionCheck && this.versionCheck("\u524D\u7AEF", feMinVersion, "2.2.1"))
5367
+ if (this.ctx.conf.versionCheck && this.versionCheck("\u524D\u7AEF", feMinVersion, "2.2.2"))
5367
5368
  return;
5368
5369
  if (this.ctx.conf.versionCheck && this.versionCheck("\u540E\u7AEF", backendMinVersion, (_b = data.api_version) == null ? void 0 : _b.version))
5369
5370
  return;
@@ -5685,7 +5686,7 @@ class List extends ListLite {
5685
5686
  if (this.ctx.conf.listSort) {
5686
5687
  this.initDropdown();
5687
5688
  }
5688
- this.$el.querySelector(".atk-copyright").innerHTML = `Powered By <a href="https://artalk.js.org" target="_blank" title="Artalk v${"2.2.1"}">Artalk</a>`;
5689
+ this.$el.querySelector(".atk-copyright").innerHTML = `Powered By <a href="https://artalk.js.org" target="_blank" title="Artalk v${"2.2.2"}">Artalk</a>`;
5689
5690
  this.ctx.on("list-reload", () => this.fetchComments(0));
5690
5691
  this.ctx.on("list-refresh-ui", () => this.refreshUI());
5691
5692
  this.ctx.on("list-import", (data) => this.importComments(data));
@@ -5915,7 +5916,7 @@ class SidebarLayer extends Component {
5915
5916
  const baseURL = getURLBasedOnApi(this.ctx, "sidebar/");
5916
5917
  const userData = encodeURIComponent(JSON.stringify(this.ctx.user.data));
5917
5918
  const location = window.location;
5918
- this.iframeLoad(`${baseURL}?pageKey=${encodeURIComponent(this.conf.pageKey)}&site=${encodeURIComponent(this.conf.site || "")}&user=${userData}&referer=${encodeURIComponent(`${location.protocol}//${location.host}${location.pathname}`)}${this.conf.darkMode ? `&darkMode=1` : ``}`);
5919
+ this.iframeLoad(`${baseURL}?pageKey=${encodeURIComponent(this.conf.pageKey)}&site=${encodeURIComponent(this.conf.site || "")}&user=${userData}&time=${+new Date()}&referer=${encodeURIComponent(`${location.protocol}//${location.host}${location.pathname}`)}${this.conf.darkMode ? `&darkMode=1` : ``}`);
5919
5920
  this.$iframeWrap.append(this.$iframe);
5920
5921
  this.firstShow = false;
5921
5922
  } else {