dsh-plugin-weapp-gateway 0.8.54 → 0.8.55
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/README.md +5 -0
- package/lib/client.js +0 -28
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,6 +11,11 @@
|
|
|
11
11
|
- 「兼容 App(备用)」的连接方式下拉与下方「配对入口」摘要卡片之间增加间距(16px),下拉不再紧贴提示卡片。
|
|
12
12
|
- 摘要卡片的内边距、下方「配对入口地址」输入框与其余配对布局保持不变。
|
|
13
13
|
- 全量测试通过。
|
|
14
|
+
### v0.8.55 · 修复设置页无法加载(locale 注入缺失)
|
|
15
|
+
|
|
16
|
+
- 修复 v0.8.54 引入的客户端加载失败:上游的语言同步 effect 引用了 `ctx.locale`,但 fork 未在 `inject` 里声明该服务,DSH 直接抛出 `cannot get property "locale" without inject`,整个客户端模块加载失败,设置页空白。
|
|
17
|
+
- fork 未引入上游的界面语言/多语言系统,遂整块移除语言同步 effect 与「界面语言」选择卡片(该卡片还引用了不存在的 `language`/`setUiLanguage`/`tr`),面板保持中文默认。
|
|
18
|
+
- `inject` 恢复为 `['slots']`;设置页四个分组与配对模块渲染恢复正常。
|
|
14
19
|
### v0.8.54 · 同步上游 0.12.1 新功能
|
|
15
20
|
|
|
16
21
|
- **生图工具图片转发**(tool-result-images-v1):`tool/result`、`tool/ptc-dispatch`、`tool/code-dispatch` 与会话历史快照携带生成图片附件元数据(PNG/JPEG/WebP/GIF,按附件 ID 去重),App 可直接展示生图结果;手机经控制连接 `attachment` 请求图片。
|
package/lib/client.js
CHANGED
|
@@ -1328,21 +1328,6 @@ window.__ModuleLoader__.load({
|
|
|
1328
1328
|
toolNotice ? React.createElement('div', { style: { ...styles.muted, marginBottom: 10 } }, toolNotice) : null,
|
|
1329
1329
|
(error || deviceLoadError || statusLoadError) ? React.createElement('div', { style: styles.error, role: 'alert' }, error || deviceLoadError || statusLoadError) : null,
|
|
1330
1330
|
React.createElement('div', { hidden: activeSection !== 'general' },
|
|
1331
|
-
React.createElement('section', { style: styles.card },
|
|
1332
|
-
React.createElement('div', { style: { display: 'flex', justifyContent: 'space-between', gap: 14, alignItems: 'center', flexWrap: 'wrap' } },
|
|
1333
|
-
React.createElement('div', null,
|
|
1334
|
-
React.createElement('strong', null, tr('界面语言')),
|
|
1335
|
-
React.createElement('div', { style: { ...styles.muted, marginTop: 4 } }, tr('跟随 DSH 的语言设置,也可单独选择此插件的显示语言。'))),
|
|
1336
|
-
React.createElement(GatewaySelect, {
|
|
1337
|
-
'data-ui-language': true, 'aria-label': tr('界面语言'),
|
|
1338
|
-
style: { ...styles.input, width: 'auto', marginBottom: 0 },
|
|
1339
|
-
value: language.preference,
|
|
1340
|
-
onChange: event => setUiLanguage(event.target.value),
|
|
1341
|
-
},
|
|
1342
|
-
React.createElement('option', { value: 'system' }, tr('跟随 DSH')),
|
|
1343
|
-
React.createElement('option', { value: 'zh' }, '简体中文'),
|
|
1344
|
-
React.createElement('option', { value: 'en' }, 'English'),
|
|
1345
|
-
React.createElement('option', { value: 'ja' }, '日本語')))),
|
|
1346
1331
|
React.createElement('section', { style: styles.card },
|
|
1347
1332
|
React.createElement('div', { style: { display: 'flex', justifyContent: 'space-between', gap: 14, alignItems: 'center' } },
|
|
1348
1333
|
React.createElement('div', null,
|
|
@@ -1771,19 +1756,6 @@ window.__ModuleLoader__.load({
|
|
|
1771
1756
|
function apply(ctx) {
|
|
1772
1757
|
// Upstream 0.10.1: the panel stylesheet is injected once through an
|
|
1773
1758
|
// effect instead of being re-rendered inside the component tree.
|
|
1774
|
-
ctx.effect(() => {
|
|
1775
|
-
const syncLanguage = () => {
|
|
1776
|
-
hostLanguage = ctx.locale.getSnapshot().active
|
|
1777
|
-
publishUiLanguage()
|
|
1778
|
-
}
|
|
1779
|
-
syncLanguage()
|
|
1780
|
-
const unsubscribe = ctx.locale.subscribe(syncLanguage)
|
|
1781
|
-
return () => {
|
|
1782
|
-
unsubscribe()
|
|
1783
|
-
hostLanguage = undefined
|
|
1784
|
-
publishUiLanguage()
|
|
1785
|
-
}
|
|
1786
|
-
}, 'mobile-gateway: host language')
|
|
1787
1759
|
ctx.effect(() => {
|
|
1788
1760
|
const style = document.createElement('style')
|
|
1789
1761
|
style.textContent = panelCss
|