Private
Public Access
1
0
Files
u-desk/docs/代码改进清单.md

24 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 代码改进清单
> 基于 Wails 开发文档 vs 项目现状审查2026-05-16
## 已完成
- [x] 🔴① `main.go` 添加 `SingleInstance` 单实例锁(`top.1216.udesk`
- [x] 🔴② `app.go:74-97` RegisterGlobalHotkey 竞态修复(合并为单一 `defer mu.Unlock()`
- [x] 🔴③ `build/windows/info.json` 版本号 0.1.0→0.4.0公司名→1216.top
- [x] 🟡⑤ 删除 `frontend/src/wailsjs/wailsjs/` v2 遗留绑定目录
- [x] 🟡⑥ `LoadConnectionProfiles` 手动 map 转换改用 `json.Marshal/Unmarshal`
- [x] 🟡⑨ `App.vue` onMounted 添加 `contextmenu` 事件拦截(禁用浏览器默认右键菜单)
- [x] 🟡⑫ `main.go` Run() 错误输出改用 `fmt.Fprintf(os.Stderr, ...)`
- [x] Sidebar 设置按钮 `···` 点击无响应修复:移除 `.stop` + Teleport 重构 + 增大点击区域
## 待处理
- [ ] ④ App 结构体拆分 — 1344 行,应拆为 FilesystemService / ProfileService / BgmService / UpdateService 等 v3 Service
- [ ]`internal/api/pdf_api.go:371` SelectDirectory 改用 Wails 原生对话框 `application.Get().Dialog.OpenFile()`
- [ ]`app.go:176-189` HWND 轮询改事件驱动 — v3 alpha 暂无对应 API后续跟进
- [ ]`app.go:29` Windows 专用导入 `golang.org/x/sys/windows/registry` 加构建标签拆到 `*_windows.go`
- [ ] ⑪ 全局结构化日志 — `fmt.Println` 替换为 `log/slog`,按优先级分批替换
- [ ]`app.go:158` 更新检查 URL `https://c.1216.top/last-version.json` 移入配置