feat(content): 安装失败的两档分组与「只重试这些」(M191)
M186 把「可只重试失败项」算到了 core/presenter(DependencyPlan::retry_request()), 但 DTO 没字段、界面没按钮,用户拿不到。这一轮补最后一公里: - DTO:ContentFailureKind 加 Incompatible 一档(不再借 Unsupported,与「缺密钥」分开); InstallProgressView 加 retry: Vec<InstallFailureView>(project + 档位 + core 原话), 档位是专门的 InstallFailureKind(Incompatible / Unreachable,穷尽映射 core 的 FailureKind); ContentInstallRequest 加 retry: bool(重试路径唯一读的字段是 instance)。 - presenter:plan.rs 把上一轮失败的计划按 host+实例记住(与 addon/pack.rs 同一手法, host/mod.rs 不在 scope);retry_request()/retry_plan() 就是「只重试这些」—— 调 core 的 retry_request()、只请求失败的那几个项目,present 重新扫目录。 install.rs 的重试入口没有记录时回一条失败,不退化成整单重装;成功则 forget + 清名单。 - 界面:内容库页插入按档分组的失败面板(两段文案、各自条目)+「只重试这 N 个」实心按钮; 判据只有一条且在模型里(stage==Failed && 名单非空),全成功时连同按钮一起不渲染。 - i18n:新增 6 条中英文案(不兼容 / 取不到 / 只重试这 N 个 / 标题 / 提示 / 关闭),金表同步。 守门(每条都做过变异验证,见报告): ① 把 retry_request() 换成根项目请求 ⇒ retrying_asks_for_the_failed_projects_only 红(roots 变 ["sodium"]); ② 两档合并 ⇒ the_retry_list_keeps_the_two_tiers_apart / the_two_tiers_are_two_groups_with_two_labels 红; ③ 恒渲染 ⇒ a_fully_successful_install_has_no_retry_surface_at_all 红。 数据包(datapack)本轮仍未做:ContentKind 没有这一项,界面上也没有半成品入口。
This commit is contained in:
1 parent
5505ea0f91
commit
5a52f38f35
24 files changed
+1072
-24
No files matched your search
@@ -95,6 +95,30 @@ macro_rules! content_entries {
|
||||
"Installing from CurseForge is not available yet",
|
||||
"CurseForge 来源的安装尚未开放"
|
||||
),
|
||||
// --- M191:安装失败的两档分组与「只重试这些」---
|
||||
// 两档**各一条**:不兼容要换版本/加载器,取不到要检查网络,合并成一句会让用户
|
||||
// 对着一条重试必然失败的项反复点重试。
|
||||
ContentInstallFailedTitle => (
|
||||
"Install did not finish — {count} items failed",
|
||||
"安装未完成 —— {count} 项没装上"
|
||||
),
|
||||
ContentInstallRetryIncompatible => (
|
||||
"Not available for this version/loader",
|
||||
"不兼容所选版本/加载器"
|
||||
),
|
||||
ContentInstallRetryUnreachable => (
|
||||
"Could not fetch (network or missing project)",
|
||||
"取不到(网络 / 项目不存在)"
|
||||
),
|
||||
ContentInstallRetryOnly => (
|
||||
"Retry just these {count}",
|
||||
"只重试这 {count} 个"
|
||||
),
|
||||
ContentInstallRetryHint => (
|
||||
"Retry asks again only for the items above; files that already landed stay put.",
|
||||
"重试只重新解析上面这几项,已落盘的文件不动。"
|
||||
),
|
||||
ContentInstallDismiss => ("Dismiss", "关闭"),
|
||||
// --- M113: pack import / export(PACKUI)---
|
||||
PackTitle => ("Modpack import & export", "整合包导入 / 导出"),
|
||||
PackImportTitle => ("Import a modpack", "导入整合包"),
|
||||
|
||||
@@ -386,6 +386,12 @@ pub(super) const ROWS: &[(&str, &str, &str)] = &[
|
||||
("ContentModpackNotReady", "Installing modpacks from the library into an instance is not available yet", "从内容库一键安装整合包到实例还没做(本地的包可以直接导入)"),
|
||||
("ContentSourceUnavailable", "CurseForge needs an API key: add one in Settings", "CurseForge 需要在设置里配置密钥才能搜索"),
|
||||
("ContentSourceNotWired", "Installing from CurseForge is not available yet", "CurseForge 来源的安装尚未开放"),
|
||||
("ContentInstallFailedTitle", "Install did not finish — {count} items failed", "安装未完成 —— {count} 项没装上"),
|
||||
("ContentInstallRetryIncompatible", "Not available for this version/loader", "不兼容所选版本/加载器"),
|
||||
("ContentInstallRetryUnreachable", "Could not fetch (network or missing project)", "取不到(网络 / 项目不存在)"),
|
||||
("ContentInstallRetryOnly", "Retry just these {count}", "只重试这 {count} 个"),
|
||||
("ContentInstallRetryHint", "Retry asks again only for the items above; files that already landed stay put.", "重试只重新解析上面这几项,已落盘的文件不动。"),
|
||||
("ContentInstallDismiss", "Dismiss", "关闭"),
|
||||
("PackTitle", "Modpack import & export", "整合包导入 / 导出"),
|
||||
("PackImportTitle", "Import a modpack", "导入整合包"),
|
||||
("PackDropHint", "Drop a .mrpack, .zip or a MultiMC/Prism instance folder here", "把 .mrpack / .zip 或 MultiMC·Prism 实例目录拖到这里"),
|
||||
|
||||
Reference in new issue
Block a user