feat: image rendering, sidebar toggle, contribute section; fix: private repo update check; bump v0.2.1

This commit is contained in:
晴天
2026-03-04 20:47:00 +08:00
parent 59c84b5eaf
commit a6e1f40a59
14 changed files with 454 additions and 83 deletions

View File

@@ -216,7 +216,14 @@ export class WsClient {
const result = await api.autoPairDevice()
console.log('[ws] 配对结果:', result)
// 配对成功后直接重连,不需要重启 Gateway
// 配对后需要 reload Gateway 使 allowedOrigins 生效
try {
await api.reloadGateway()
console.log('[ws] Gateway 已重载')
} catch (e) {
console.warn('[ws] reloadGateway 失败(非致命):', e)
}
console.log('[ws] 配对成功2秒后重新连接...')
setTimeout(() => {
if (!this._intentionalClose) {