Split Gio shell responsibilities (T-610)

This commit is contained in:
ila
2026-07-18 14:23:02 +08:00
parent 75b1803564
commit e9386d26e7
17 changed files with 1596 additions and 1481 deletions
+12
View File
@@ -43,6 +43,18 @@
| LicensePanel | 授权 | 导入与状态展示 |
| Toast/Dialog | 全局 | 错误与确认交互 |
T-610 固定 modern 与 Win7 两个 `ui/gio` 适配器的同 package 文件职责;文件名镜像,但不跨 workspace 共享 Gio 代码:
| 文件 | 职责 |
| --- | --- |
| `shell.go` | `AppShell` 状态/构造、`SetItems`/`ApplyIcon` 生命周期、根 `Layout` 与输入 drain |
| `shell_header.go` | 顶部栏、分类、view/filter 导航与版本特有 footer |
| `shell_catalog.go` | content/catalog、惰性列表、app row/icon 与空状态 |
| `shell_detail.go` | 详情布局、详情字段与动作/回退文案 helper |
| `shell_style.go` | palette/theme、panel 绘制、view/status 文案与颜色 helper |
这些文件仍共同实现一个 `gio` package,不是新增页面 API 或状态层。modern-only 的 `layoutCatalog`/`layoutFooter`/`actionLabel` 等保留在对应职责文件,Win7 不增加空壳;后续视图应进入相应职责文件,不能重新把布局链堆回根 `shell.go`。
每个页面用独立 struct 保存:`widget.Clickable`、`widget.Editor`、`layout.List`、过滤条件、当前 ViewModel、pending RequestID、临时提示和错误状态。
## 交互规则(硬约束)