fix(app-iced): M119 出图抓到的两处:右栏文案没跟 lang 走、确认条文字被压成竖缝
两张验收图(`DevDocs/artifacts/m119/`)暴露的问题,都是测试抓不住、只有图能看出来的那类: 1. **同屏两语**:`pages/agent/mod.rs` 里还留着 M104 的 `const LANG: Lang = Lang::En`,所以右栏的 标题/按钮恒英文,而 M119 新加的失败横幅走 `App::lang()`(这台机器是 zh-CN)⇒ 一屏里 「Assistant / Collapse」和「连不上助手后端」并排。现在删掉那个常量,`docked`/`page` 收一个 `Catalog` 形参,由 `App::lang().catalog()` 给——与设置页/账户页同一条口径(M106 的真值源)。 2. **确认条没有字**:`chip + 文字 + 两个按钮` 挤在同一条 `Row` 里,而右栗只有 280~360:320 宽下 文字列被压成一条竖缝,标题整段看不见(图 05 第一版就是这个样子)。改成文字行与动作**分行**, 动作右对齐——窄栏里才是可读的 M3 告警形态。 顺带:`Script::WriteOp` 补一句增量,免得那条助手气泡是空壳(出图更接近真后端)。 `cargo test -p unlucky-app-iced --lib`:599 passed / 0 failed;14 张图重出后逐张看过。
This commit is contained in:
1 parent
d4fd675935
commit
b5e96c61ac
8 files changed
+60
-27
No files matched your search
@@ -60,6 +60,8 @@ impl App {
|
||||
// 备好的**展示输入**(标题 catalog 键 + 已脱敏正文)。壳在这里不做任何脱敏。
|
||||
let rail = self.agent_host.rail();
|
||||
let failure = self.agent_failure();
|
||||
// 界面语言的真值源是 `App::lang`(M106):右栏的静态文案也走它,不再有 `const LANG`
|
||||
let agent_catalog = self.lang().catalog();
|
||||
|
||||
let account = self.rail_account();
|
||||
match pages::Screen::of(self.state.route()) {
|
||||
@@ -83,8 +85,15 @@ impl App {
|
||||
self.language(),
|
||||
)
|
||||
.map(Message::Page),
|
||||
agent::docked(&self.ui, &self.agent, rail, failure, self.width)
|
||||
.map(|element| element.map(Message::Agent)),
|
||||
agent::docked(
|
||||
&self.ui,
|
||||
&self.agent,
|
||||
rail,
|
||||
failure,
|
||||
agent_catalog,
|
||||
self.width,
|
||||
)
|
||||
.map(|element| element.map(Message::Agent)),
|
||||
overlay,
|
||||
self.options.force_state,
|
||||
self.lang(),
|
||||
@@ -103,7 +112,15 @@ impl App {
|
||||
},
|
||||
APP_TITLE,
|
||||
background,
|
||||
agent::page(&self.ui, &self.agent, rail, failure, self.width).map(Message::Agent),
|
||||
agent::page(
|
||||
&self.ui,
|
||||
&self.agent,
|
||||
rail,
|
||||
failure,
|
||||
agent_catalog,
|
||||
self.width,
|
||||
)
|
||||
.map(Message::Agent),
|
||||
None,
|
||||
overlay,
|
||||
self.options.force_state,
|
||||
|
||||
Reference in new issue
Block a user