dsh-folia 4.17.0 → 4.17.1

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.
Files changed (2) hide show
  1. package/lib/client.js +8 -2
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -18314,6 +18314,13 @@ window.__ModuleLoader__.load({
18314
18314
  const busyRef = React.useRef("");
18315
18315
  const [note, setNote] = React.useState(null);
18316
18316
 
18317
+ // ⚠️ 这两面旗必须**在函数体最前面**算出来:下面「刷新」按钮的文案就要用它。
18318
+ // 曾把它们写在列表渲染处(更靠后)⇒ 首次渲染读到 TDZ 里的 const
18319
+ // ⇒ `Cannot access 'busyIsStructural' before initialization` ⇒ 整页被守卫接住变红。
18320
+ // 教训:渲染函数里任何"靠后声明的 const"都可能被靠前的 JSX 读到,声明一律前置。
18321
+ const busyIsStructural = /^(install|remove|repair):/.test(String(busy || ""));
18322
+ const busyIsActivating = /^activate:/.test(String(busy || ""));
18323
+
18317
18324
  const load = React.useCallback(async (force) => {
18318
18325
  try {
18319
18326
  const resp = await apiJson("/skins/list" + (force ? "?refresh=1" : ""), { parse: "always" });
@@ -18573,8 +18580,7 @@ window.__ModuleLoader__.load({
18573
18580
  // 所以把 busy 拆成两条互不相干的通道:
18574
18581
  // · 结构操作(install / remove / repair):改动磁盘目录,串行,期间只锁**结构按钮**
18575
18582
  // · 切换(activate):只写 active,幂等且"最后动作优先",期间只锁**该卡片的「应用」**
18576
- const busyIsStructural = /^(install|remove|repair):/.test(String(busy || ""));
18577
- const busyIsActivating = /^activate:/.test(String(busy || ""));
18583
+ // (这两面旗已上移到函数开头声明 —— 上面的「刷新」按钮文案要用到它们,写在这里会触发 TDZ。)
18578
18584
 
18579
18585
  const installed = (state && state.installed) || [];
18580
18586
  const activeId = (state && state.active) || "";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-folia",
3
- "version": "4.17.0",
3
+ "version": "4.17.1",
4
4
  "description": "Folia 壁纸引擎:把本机 Wallpaper Engine 壁纸搬进 DSH 界面(场景实时渲染 / 视频 / 网页),内置液态玻璃与 Folia 吉祥物,并可从自建站点拉取壁纸。单包形态(组件已合并)。",
5
5
  "type": "module",
6
6
  "engines": {