dsh-folia 4.26.0-pre.48 → 4.26.0-pre.49
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
|
@@ -738,6 +738,9 @@ window.__ModuleLoader__.load({
|
|
|
738
738
|
"位置已复位(下一次出现回到右下角)": "Position reset — it returns to the bottom-right next time",
|
|
739
739
|
"复位位置": "Reset position",
|
|
740
740
|
"大小": "Size",
|
|
741
|
+
// pre.49:桌宠页控制行最右侧的语音助手开关(点开才挂载设置块)。
|
|
742
|
+
"智能大肥鱼": "Smart Chubby Fish",
|
|
743
|
+
"桌宠语音助手": "Pet voice assistant",
|
|
741
744
|
"卸载": "Uninstall",
|
|
742
745
|
"{cols} 列 · {size}": "{cols} cols · {size}",
|
|
743
746
|
"还没有安装任何桌宠 —— 从下面的站点清单里挑一只。": "No pets installed yet — pick one from the site list below.",
|
|
@@ -18548,6 +18551,9 @@ window.__ModuleLoader__.load({
|
|
|
18548
18551
|
const [busy, setBusy] = React.useState("");
|
|
18549
18552
|
const [note, setNote] = React.useState(null);
|
|
18550
18553
|
const [importable, setImportable] = React.useState([]);
|
|
18554
|
+
// pre.49:控制行最右侧的「🐟 智能大肥鱼」开关。默认**收起** —— 语音助手设置块只在
|
|
18555
|
+
// 用户真的点开时才挂载(避免常驻请求 /pet-chat/config 与 /work-plugins,也不占页面高度)。
|
|
18556
|
+
const [assistantOpen, setAssistantOpen] = React.useState(false);
|
|
18551
18557
|
// 4.23.3:安装进度以 /folia/downloads/list 为真源(kind=pet),切页签回来仍在。
|
|
18552
18558
|
const dl = useDownloadJobs();
|
|
18553
18559
|
// 4.23.4:**卡片级**状态机(四页签共用,见 src/local-first.js 的 `dlCardState`)——
|
|
@@ -18789,6 +18795,15 @@ window.__ModuleLoader__.load({
|
|
|
18789
18795
|
React.createElement("option", { key: String(v), value: String(v) }, t)),
|
|
18790
18796
|
),
|
|
18791
18797
|
),
|
|
18798
|
+
// pre.49:语音助手设置块的展开/收起。纯本地 state,不发网络;与「复位位置」同一档 .we-picker__btn。
|
|
18799
|
+
React.createElement("button", {
|
|
18800
|
+
type: "button",
|
|
18801
|
+
className: "we-picker__btn",
|
|
18802
|
+
"aria-expanded": assistantOpen ? "true" : "false",
|
|
18803
|
+
"aria-controls": "we-pet-chat-settings",
|
|
18804
|
+
title: weT("桌宠语音助手"),
|
|
18805
|
+
onClick: () => setAssistantOpen((v) => !v),
|
|
18806
|
+
}, "🐟 " + weT("智能大肥鱼")),
|
|
18792
18807
|
));
|
|
18793
18808
|
|
|
18794
18809
|
// 与开机动画页签同理:提示行常驻占位,避免开关时整块高度跳动。
|
|
@@ -18910,8 +18925,10 @@ window.__ModuleLoader__.load({
|
|
|
18910
18925
|
}
|
|
18911
18926
|
|
|
18912
18927
|
// ── 桌宠对话(/folia/pet-chat/*)────────────────────────────────────────
|
|
18913
|
-
//
|
|
18914
|
-
|
|
18928
|
+
// pre.49:**默认收起**,点控制行最右侧的「🐟 智能大肥鱼」才挂载(条件渲染,不用 CSS 隐藏)。
|
|
18929
|
+
if (assistantOpen) {
|
|
18930
|
+
children.push(React.createElement(PetChatSettings, { key: "petChat" }));
|
|
18931
|
+
}
|
|
18915
18932
|
|
|
18916
18933
|
return React.createElement("div", { className: "we-picker__section" }, children);
|
|
18917
18934
|
}
|
|
@@ -19063,7 +19080,7 @@ window.__ModuleLoader__.load({
|
|
|
19063
19080
|
style: { marginTop: '4px', color: '#d9a13b' },
|
|
19064
19081
|
}, weT('冲突提醒:') + workPlugins.conflict.note));
|
|
19065
19082
|
}
|
|
19066
|
-
return React.createElement('div', { style: { ...PET_STYLE.card, marginTop: '10px' } }, child);
|
|
19083
|
+
return React.createElement('div', { id: 'we-pet-chat-settings', style: { ...PET_STYLE.card, marginTop: '10px' } }, child);
|
|
19067
19084
|
}
|
|
19068
19085
|
|
|
19069
19086
|
/** 页签组装点调用它。 */
|