feat: 完成账号桌面快捷方式

- 新增 chrome.create_shortcut 使用 PowerShell WScript.Shell 生成 .lnk

- 快捷方式参数复用 Chrome 启动参数,包含调试端口、allow-origins 和账号 user-data-dir

- 在账号服务层和 Tab④ 增加快捷方式入口,不包含密码或密钥

- 补充 chrome/accounts/gui 测试并同步任务、API、路由、当前状态和进度文档
This commit is contained in:
chengma
2026-06-27 10:38:21 +08:00
parent 598df5f20b
commit 742193607b
11 changed files with 208 additions and 13 deletions
+8
View File
@@ -352,3 +352,11 @@
- 追加收尾:运行最新 GUI 后发现顶部 5 个 Tab 间距偏紧,容易误点;已在 `MainWindow` 应用全局 `TAB_STYLE`,包含 Tab 最小宽度、padding、间距、hover 与当前态高亮,并补测试防止后续误删。
- 验证:`python -m compileall app main.py tests` 通过;`python -m unittest discover -s tests` 通过;`py -3 -m compileall app main.py tests` 通过;`py -3 -m unittest discover -s tests` 通过;本轮未连接真实 Shopee/CDP 做登录检测实跑,登录检测路径由 mock 覆盖。
- 下一步:按任务看板领取 T-106(可选)。
## 【2026-06-27】T-106 账号桌面快捷方式
- 状态:DONE
- 变更:`app/chrome.py` 新增 `create_shortcut()`,复用 `build_launch_args()` 生成 Chrome 目标与参数,并通过 PowerShell `WScript.Shell.CreateShortcut` 写 `.lnk`;`app/accounts.py` 新增 `create_shortcut()` 服务包装;`app/gui.py` 在 ④ 账号管理增加「快捷方式」按钮,选中账号后生成默认桌面快捷方式并提示路径;同步 `docs/06-tasks.md`、`docs/current-state.md`、`docs/api.md`、`docs/routes.md`。
- 细节:快捷方式参数包含 `--remote-debugging-port`、`--remote-allow-origins=*`、`--user-data-dir=<该账号目录>`;不包含账号密码/API Key;测试 mock PowerShell 调用,不在测试环境真实写桌面。
- 验证:`python -m compileall app main.py tests` 通过;`python -m unittest discover -s tests` 通过;`py -3 -m compileall app main.py tests` 通过;`py -3 -m unittest discover -s tests` 通过。
- 下一步:按任务看板领取 T-201。