fix: 微信插件安装前端不再传 OpenClaw 版本号,由后端自动检测 + about.js getLang 导入修复

- channels.js: 两处 runChannelAction 调用均传 null,后端自动检测 OpenClaw 版本决定用 v1.0.3 或 latest
- about.js: 补全 getLang 导入(BNB 钱包条件显示依赖)
This commit is contained in:
晴天
2026-03-26 04:11:17 +08:00
parent 65ec1c781e
commit b66a1de59a
2 changed files with 8 additions and 10 deletions

View File

@@ -7,7 +7,7 @@ import { toast } from '../components/toast.js'
import { showUpgradeModal, showConfirm } from '../components/modal.js'
import { setUpgrading } from '../lib/app-state.js'
import { icon, statusIcon } from '../lib/icons.js'
import { t } from '../lib/i18n.js'
import { t, getLang } from '../lib/i18n.js'
export async function render() {
const page = document.createElement('div')
@@ -639,6 +639,11 @@ function renderCompany(page) {
<div style="font-size:var(--font-size-xs);color:var(--text-tertiary);line-height:1.6">
${t('about.companyDesc')}
</div>
${getLang() === 'zh-CN' ? `<div style="margin-top:8px;padding:10px 12px;border-radius:var(--radius-md);border:1px dashed var(--border-primary);background:var(--bg-secondary);font-size:var(--font-size-xs);color:var(--text-tertiary);display:flex;align-items:center;gap:8px">
<span style="opacity:0.6">☕</span>
<span>请作者喝杯咖啡 (BNB Chain)</span>
<code style="font-size:10px;background:var(--bg-tertiary);padding:2px 6px;border-radius:4px;user-select:all;word-break:break-all">0xbdd7ebdf2b30d873e556799711021c6671ffe88f</code>
</div>` : ''}
</div>
`
}

View File

@@ -1449,15 +1449,8 @@ async function openConfigDialog(pid, page, state, accountId) {
if (progressText) progressText.textContent = `${pct}%`
})
// 自动 pin 插件版本到用户的 OpenClaw 版本(仅 install 动作
let actionVersion = null
if (actionId === 'install') {
try {
const vInfo = await api.getVersionInfo()
if (vInfo?.current) actionVersion = vInfo.current.split('-')[0]
} catch {}
}
const output = await api.runChannelAction(pid, actionId, actionVersion)
// runChannelAction 的版本由后端自动检测(微信/QQ 版本号独立于 OpenClaw
const output = await api.runChannelAction(pid, actionId, null)
_flushQr() // 命令结束后刷新残留 QR 缓冲
if (progressBar) progressBar.style.width = '100%'
if (progressText) progressText.textContent = '100%'