dsh-folia 2.4.3 → 2.4.5
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/lib/client.js +42 -3
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -16294,8 +16294,23 @@ window.__ModuleLoader__.load({
|
|
|
16294
16294
|
} else if (kind === "activate") {
|
|
16295
16295
|
setNote({
|
|
16296
16296
|
kind: "ok",
|
|
16297
|
-
text: weT("已切换到「") + label + weT("
|
|
16297
|
+
text: weT("已切换到「") + label + weT("」,正在刷新界面…"),
|
|
16298
|
+
// 皮肤中心**只在页面加载时**应用皮肤:它的 `POST /v2/active` 也只写状态文件,
|
|
16299
|
+
// 不重绘。所以"真的换肤"只有重新加载这一页一条路 —— 见下面的自动跳转。
|
|
16300
|
+
reload: true,
|
|
16298
16301
|
});
|
|
16302
|
+
// 一次点击就完成:这里自动重新加载,不再让用户点第二次。
|
|
16303
|
+
// 用 `location.replace(href)` 而非 `reload()`:桌面壳里 reload 有时被吞掉
|
|
16304
|
+
//(表现正是"点了没反应"),硬跳转更容易生效,且 replace 不往历史里塞条目。
|
|
16305
|
+
try {
|
|
16306
|
+
setTimeout(function tryApply() {
|
|
16307
|
+
try {
|
|
16308
|
+
window.location.replace(window.location.href);
|
|
16309
|
+
} catch (e1) {
|
|
16310
|
+
try { window.location.reload(); } catch (e2) { /* 交给手动按钮 */ }
|
|
16311
|
+
}
|
|
16312
|
+
}, 700);
|
|
16313
|
+
} catch { /* 环境不支持 → 手动按钮兜底 */ }
|
|
16299
16314
|
// 不再整表重拉:本地标记已经对了,省掉那 600 ms 的"没反应"窗口。
|
|
16300
16315
|
} else if (kind === "remove") {
|
|
16301
16316
|
setNote({ kind: "ok", text: weT("已删除:") + label });
|
|
@@ -16380,8 +16395,32 @@ window.__ModuleLoader__.load({
|
|
|
16380
16395
|
children.push(React.createElement("div", {
|
|
16381
16396
|
key: "note",
|
|
16382
16397
|
className: "we-picker__hint",
|
|
16383
|
-
style: {
|
|
16384
|
-
|
|
16398
|
+
style: {
|
|
16399
|
+
color: note.kind === "err" ? "#ff9a9a" : "#8ee6a8",
|
|
16400
|
+
margin: "6px 0 10px",
|
|
16401
|
+
display: "flex",
|
|
16402
|
+
gap: "10px",
|
|
16403
|
+
alignItems: "center",
|
|
16404
|
+
flexWrap: "wrap",
|
|
16405
|
+
},
|
|
16406
|
+
},
|
|
16407
|
+
React.createElement("span", null, note.text),
|
|
16408
|
+
note.reload
|
|
16409
|
+
? React.createElement("button", {
|
|
16410
|
+
type: "button",
|
|
16411
|
+
className: "we-picker__btn we-picker__btn--primary",
|
|
16412
|
+
style: { fontSize: "11.5px", padding: "3px 10px" },
|
|
16413
|
+
onClick: () => {
|
|
16414
|
+
// 与自动那条路一致:优先硬跳转,退而 reload。只重载前端页面 ——
|
|
16415
|
+
// 对话与设置都在宿主侧,不会丢。
|
|
16416
|
+
try { window.location.replace(window.location.href); } catch {
|
|
16417
|
+
try { window.location.reload(); } catch { /* 极端环境刷不动就让用户手动重启 */ }
|
|
16418
|
+
}
|
|
16419
|
+
},
|
|
16420
|
+
title: weT("重新加载界面以应用新皮肤(对话与设置都在宿主侧,不会丢)"),
|
|
16421
|
+
}, weT("立即生效"))
|
|
16422
|
+
: null,
|
|
16423
|
+
));
|
|
16385
16424
|
}
|
|
16386
16425
|
children.push(React.createElement("div", {
|
|
16387
16426
|
key: "search",
|