test(app-iced, presenter): M114 出图补三个取证态(第三方站失败 / 离线失败 / 中文错误码)

- mock 增 `authlib-failed` 场景:AuthlibLoginChanged(Failed, NotAuthlibServer),原文只进日志
- `ULL_ACCOUNT_STATE=notice` 现在同时打开离线面板(截图能看到「表单 + 失败横幅」同屏)
- 新增**截图专用**语言开关 `ULL_LANG=zh`(仅在 `--screenshot` 下生效):D30 要求错误码文案
  中英各一张图,交互模式仍钉死 Lang::En(与产品行为一致)
This commit is contained in:
AskaEth committed 2026-11-05 05:10:13 +08:00
1 parent 9d0d985b1b
commit 73badb8a02
7 files changed
+128 -81

No files matched your search

+11
View File
@@ -168,6 +168,17 @@ pub(super) fn force_account_state(app: &mut App) {
app.state.device_login_started =
Some(std::time::Instant::now() - std::time::Duration::from_secs(3_600));
}
// 第三方站**失败**态:面板打开 + mock 那边给出的 `AuthlibLoginChanged(Failed)`
"authlib-failed" => {
app.account_form.panel = crate::pages::account::Panel::Authlib;
app.account_form.server = "https://example.invalid/api/yggdrasil/".to_string();
app.account_form.login = "alex@example.com".to_string();
}
// 离线档案失败态:面板打开(横幅由 mock 的 notice 场景给)
"notice" => {
app.account_form.panel = crate::pages::account::Panel::Offline;
app.account_form.offline_name = "ab".to_string();
}
// 第三方站表单:直接把面板打开并预填地址
"authlib" | "authlib-form" => {
app.account_form.panel = crate::pages::account::Panel::Authlib;
+2 -1
View File
@@ -33,7 +33,8 @@ impl App {
},
APP_TITLE,
background,
// M106:账户页的文案跟着**生效语言**走(早期钉死 `Lang::En` 的写法已删)。
// M106:账户页的文案跟着**生效语言**走(`LangState::boot` 自己读 `ULL_LANG`,
// 所以 M114 早期那个「截图专用语言开关」已删——两套开关必然漂)。
pages::account::view(&self.ui, metrics, &self.account, self.lang()).map(Message::Page),
agent::docked(&self.ui, &self.agent, self.width)
.map(|element| element.map(Message::Agent)),