dsh-folia 3.1.0 → 3.1.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.
- package/lib/client.js +20 -3
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -16794,9 +16794,26 @@ window.__ModuleLoader__.load({
|
|
|
16794
16794
|
style: { margin: "4px 0 8px", display: "flex", gap: "8px", alignItems: "center", flexWrap: "wrap" },
|
|
16795
16795
|
},
|
|
16796
16796
|
React.createElement("span", null, weT("当前皮肤:") + activeName),
|
|
16797
|
-
|
|
16798
|
-
|
|
16799
|
-
|
|
16797
|
+
// 谁在应用这套皮肤?判据只有一个:皮肤中心自己会给 <html> 盖 `data-dsh-skin`。
|
|
16798
|
+
// 属性 == 当前皮肤 ⇒ 它接管的(原生应用,完整)
|
|
16799
|
+
// 属性 缺失/不等 ⇒ 我们复刻兜底的(可能不全)
|
|
16800
|
+
// 把这层区别直接显示出来,省得"看起来不全"时无从判断该怪谁。
|
|
16801
|
+
(() => {
|
|
16802
|
+
let native = false;
|
|
16803
|
+
try { native = document.documentElement.getAttribute("data-dsh-skin") === active; } catch { native = false; }
|
|
16804
|
+
return React.createElement("span", {
|
|
16805
|
+
style: {
|
|
16806
|
+
fontSize: "11px",
|
|
16807
|
+
padding: "1px 6px",
|
|
16808
|
+
borderRadius: "999px",
|
|
16809
|
+
background: native ? "rgba(142,230,168,0.16)" : "rgba(255,196,120,0.16)",
|
|
16810
|
+
color: native ? "#8ee6a8" : "#ffd08a",
|
|
16811
|
+
},
|
|
16812
|
+
title: native
|
|
16813
|
+
? weT("皮肤中心在页面加载时应用的(原生路径,完整)")
|
|
16814
|
+
: weT("皮肤中心没接手,用的是本插件的兜底注入(可能显示不全)"),
|
|
16815
|
+
}, native ? weT("皮肤中心接管") : weT("本地兜底"));
|
|
16816
|
+
})(),
|
|
16800
16817
|
));
|
|
16801
16818
|
}
|
|
16802
16819
|
|