fix(app-iced, presenter): M114 r4 —— 登录面板 Close 不再是死按钮 + 面板态删掉原文字段(把「画原文」变成编译错)
复审 r2 P2-1:`Account::Close` 只在 `phase.busy()` 时派 `CancelDeviceLogin`,而 `Page::build` 只要非 Idle 就强制回 Microsoft ⇒ Failed/Succeeded 下 Close 点了没反应。 - 判据改成「两条轨任一非 Idle 就取消」;host 侧 `CancelDeviceLogin` 本来就把两条轨收成 Idle - mock 补 `AppCommand::CancelDeviceLogin` 分支(按真 host 契约发 Idle),否则 mock 下不可验 - 新增 headless 回归闸:失败/成功/第三方轨三种态 → Close → `panel == None` (变异实证:判据退回 `busy()` ⇒ 该用例红,打印 left: Microsoft / right: None) 复审 r2 P2-2:`DevicePanel`/`AuthlibPanel` 删掉 `message`/`detail` 字段。 视图没有材料可画,「把后端原文画上屏」从测试问题变成**类型错误**; `tests_text.rs` 的 docstring 改成真实边界(只覆盖模型 + i18n 查表,视图靠类型 + 出图)。 顺带(塔看图标出):alert 的 `Code: …` 与标题同排,省一整行高度, 避免 1180×760 把 All accounts 第三行挤到折线下;新增 `closed` 取证场景出「关掉之后」的对照图。
This commit is contained in:
1 parent
bc71834bc3
commit
f3e20b670e
9 files changed
+188
-81
No files matched your search
@@ -123,23 +123,20 @@ pub fn alert<'a>(
|
||||
..container::Style::default()
|
||||
});
|
||||
|
||||
let mut lines = iced::widget::Column::new().spacing(ui.space(Space::X1));
|
||||
lines = lines.push(frame::text_role(
|
||||
ui,
|
||||
TypeRole::TitleSmall,
|
||||
true,
|
||||
title,
|
||||
ui.color(Role::OnSurface),
|
||||
));
|
||||
lines = lines.push(frame::text_role_owned(
|
||||
ui,
|
||||
TypeRole::BodySmall,
|
||||
false,
|
||||
body,
|
||||
ui.color(Role::OnSurfaceVariant),
|
||||
));
|
||||
// 标题与 `Code: …` 同**一行**:`Code` 只是取证用的稳定 id,不值得占一整行高度
|
||||
// (1180×760 下多一行就把「All accounts」第三行挤到折线下)。
|
||||
let mut title_row = iced::widget::Row::new()
|
||||
.spacing(ui.space(Space::X2))
|
||||
.align_y(Alignment::Center)
|
||||
.push(frame::text_role(
|
||||
ui,
|
||||
TypeRole::TitleSmall,
|
||||
true,
|
||||
title,
|
||||
ui.color(Role::OnSurface),
|
||||
));
|
||||
if let Some(code) = code {
|
||||
lines = lines.push(frame::text_role_owned(
|
||||
title_row = title_row.push(frame::text_role_owned(
|
||||
ui,
|
||||
TypeRole::LabelSmall,
|
||||
false,
|
||||
@@ -148,6 +145,16 @@ pub fn alert<'a>(
|
||||
));
|
||||
}
|
||||
|
||||
let mut lines = iced::widget::Column::new().spacing(ui.space(Space::X1));
|
||||
lines = lines.push(title_row);
|
||||
lines = lines.push(frame::text_role_owned(
|
||||
ui,
|
||||
TypeRole::BodySmall,
|
||||
false,
|
||||
body,
|
||||
ui.color(Role::OnSurfaceVariant),
|
||||
));
|
||||
|
||||
container(
|
||||
row![
|
||||
chip,
|
||||
|
||||
Reference in new issue
Block a user