feat: add chrome path picker
This commit is contained in:
+9
-1
@@ -3,7 +3,7 @@ id: T-557
|
||||
title: ⑤设置 Chrome 路径增加文件选择按钮
|
||||
phase: 7
|
||||
deps: [T-539, T-543]
|
||||
status: TODO
|
||||
status: DONE
|
||||
created: 2026-07-08
|
||||
---
|
||||
|
||||
@@ -44,3 +44,11 @@ created: 2026-07-08
|
||||
## 边界(不改什么)
|
||||
|
||||
只改⑤设置页 Chrome 路径的 GUI 选择入口和测试;不改 `config.json` schema、不改 `appconfig.chrome_path()`、不改 `app/chrome.py` 启动参数、不改④账号管理、不改 CDP/Shopee 逻辑、不引入自动搜索/自动安装/自动启动 Chrome。
|
||||
|
||||
## 执行记录
|
||||
|
||||
- 2026-07-08:⑤设置页「Chrome路径」改为输入框 + `选择...` 按钮的横向控件,按钮对象名为 `chromePathBrowseButton`。
|
||||
- 2026-07-08:点击 `选择...` 后调用 `QFileDialog.getOpenFileName()`,中文标题为「选择 Chrome 程序」,过滤 `chrome.exe` / `*.exe`;选中文件后回填 `chromePathEdit` 并沿用现有未保存状态机制,取消不改变路径。
|
||||
- 2026-07-08:保存逻辑仍复用现有 `save_app_settings()`,所选路径写入 `config.json` 的 `chrome_path`,未改配置 schema、Chrome 启动、账号管理或 CDP。
|
||||
- 2026-07-08:更新 GUI 单测,覆盖按钮存在、布局、选择回填、取消不改值、选择后保存写入配置。
|
||||
- 验证通过:`python -m ruff check app tests main.py`、`py -3.10 -m compileall app main.py`、`py -3.10 -m unittest discover -s tests`、`git diff --check`。
|
||||
|
||||
Reference in New Issue
Block a user