feat: ClawPanel v0.1.0 项目骨架

- Tauri v2 + Vanilla JS + Vite 技术栈
- 9 个页面: 仪表盘/服务管理/日志/模型配置/Agent配置/Gateway/MCP工具/记忆文件/部署
- Rust 后端: 配置读写/服务管理(launchd)/日志读取/记忆文件管理
- 暗色主题 + 玻璃拟态 UI
- Mock 数据支持纯浏览器开发调试
This commit is contained in:
晴天
2026-02-26 22:34:55 +08:00
commit e26c4d9307
54 changed files with 13839 additions and 0 deletions

28
src/components/toast.js Normal file
View File

@@ -0,0 +1,28 @@
/**
* Toast 通知组件
*/
let _container = null
function ensureContainer() {
if (!_container) {
_container = document.createElement('div')
_container.className = 'toast-container'
document.body.appendChild(_container)
}
return _container
}
export function toast(message, type = 'info', duration = 3000) {
const container = ensureContainer()
const el = document.createElement('div')
el.className = `toast ${type}`
el.textContent = message
container.appendChild(el)
setTimeout(() => {
el.style.opacity = '0'
el.style.transform = 'translateX(20px)'
el.style.transition = 'all 250ms ease'
setTimeout(() => el.remove(), 250)
}, duration)
}