dsh-folia 2.4.5 → 2.4.6
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 +26 -0
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -16384,6 +16384,32 @@ window.__ModuleLoader__.load({
|
|
|
16384
16384
|
));
|
|
16385
16385
|
}
|
|
16386
16386
|
|
|
16387
|
+
// ⚠️ **壁纸在台时皮肤不会生效** —— 这是皮肤中心写死的行为,不是我们的 bug:
|
|
16388
|
+
// · host 侧:peer(= 本插件)持久化的壁纸选择非空时,它从文档里**扣住**皮肤;
|
|
16389
|
+
// · client 侧:它盯 `body[data-we-wallpaper]`,只要那个标记在,就把皮肤让位
|
|
16390
|
+
// (源码注释:`an active WE wallpaper suppresses skin media`)。
|
|
16391
|
+
// 于是"点了使用但界面没变"最可能的原因就是**壁纸还开着**。这里直接读那个标记,
|
|
16392
|
+
// 命中就把话说清楚,并告诉用户该先做什么。
|
|
16393
|
+
let wallpaperOn = false;
|
|
16394
|
+
try {
|
|
16395
|
+
wallpaperOn = Boolean(document.body && document.body.hasAttribute("data-we-wallpaper"));
|
|
16396
|
+
} catch { /* 拿不到 DOM 就当没有 */ }
|
|
16397
|
+
if (wallpaperOn) {
|
|
16398
|
+
children.push(React.createElement("div", {
|
|
16399
|
+
key: "wpwarning",
|
|
16400
|
+
className: "we-picker__hint",
|
|
16401
|
+
style: {
|
|
16402
|
+
margin: "4px 0 10px",
|
|
16403
|
+
padding: "7px 10px",
|
|
16404
|
+
borderRadius: "8px",
|
|
16405
|
+
background: "rgba(255,196,120,0.12)",
|
|
16406
|
+
color: "#ffd08a",
|
|
16407
|
+
lineHeight: 1.5,
|
|
16408
|
+
},
|
|
16409
|
+
}, weT("⚠️ 当前有壁纸在台:皮肤会被壁纸让位,切换不会生效。")
|
|
16410
|
+
+ weT(" 先到「壁纸」页签点「清除」,再回来切换皮肤。")));
|
|
16411
|
+
}
|
|
16412
|
+
|
|
16387
16413
|
if (error) {
|
|
16388
16414
|
children.push(React.createElement("div", {
|
|
16389
16415
|
key: "err",
|