mirror of
https://github.com/qingchencloud/clawpanel.git
synced 2026-07-19 11:43:19 +08:00
feat: 飞书官方插件迁移 + 配对审批 + Gateway防卡死 + 微信升级修复 + 更新检测修复
- 飞书渠道从 @openclaw/feishu 迁移到 @larksuite/openclaw-lark 官方插件 - 保存飞书配置时自动禁用旧 feishu 插件,防止新旧插件冲突 - 所有主要渠道(飞书/Telegram/Discord/Slack)启用配对审批UI - gateway_command 增加20s超时,超时后force-kill+fresh start - 全平台启动前端口占用检查,防止Guardian无限拉起 - Linux gateway_command 补齐 Duration 导入和 cleanup_zombie 实现 - Guardian自动守护在Tauri桌面端也启用,轮询间隔30s→15s - 微信渠道:升级操作不再弹出扫码二维码,按钮文案区分安装/升级 - 版本更新检测:CI不再将minAppVersion写死为当前版本 - 部署脚本增强OpenClaw检测,支持已安装的官方版 - 日间/夜间模式圆形扩散切换动画(View Transitions API) - API错误信息完整展示(429限流等),URL自动转可点击链接 - 第三方API接入引导优化:移除内置密钥,引导式流程 - 修复全平台 Clippy 警告(strip_prefix/dead_code/unnecessary_unwrap等) - Rust代码格式化修复(cargo fmt) - toast组件支持HTML内容渲染 - Rust后端test_model返回详细错误信息
This commit is contained in:
@@ -9,10 +9,26 @@ export function initTheme() {
|
||||
applyTheme(theme)
|
||||
}
|
||||
|
||||
export function toggleTheme() {
|
||||
const current = document.documentElement.dataset.theme || 'light'
|
||||
export function toggleTheme(onApply) {
|
||||
const html = document.documentElement
|
||||
const current = html.dataset.theme || 'light'
|
||||
const next = current === 'dark' ? 'light' : 'dark'
|
||||
applyTheme(next)
|
||||
|
||||
// 设置扩散起点:白切黑从左下角,黑切白从右上角
|
||||
const toDark = next === 'dark'
|
||||
html.style.setProperty('--theme-reveal-x', toDark ? '0%' : '100%')
|
||||
html.style.setProperty('--theme-reveal-y', toDark ? '100%' : '0%')
|
||||
|
||||
const doApply = () => {
|
||||
applyTheme(next)
|
||||
if (onApply) onApply(next)
|
||||
}
|
||||
|
||||
if (document.startViewTransition) {
|
||||
document.startViewTransition(doApply)
|
||||
} else {
|
||||
doApply()
|
||||
}
|
||||
return next
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user