feat(app-iced): Java 页「下载一个 JDK」+ 三个设置键(M197)
用户原话:「我们内置了那么多镜像源 甚至用户不能手动选择指定版本下载。」
「自动下载 jdk17 作为基准版本,后续在设置中提供多版本可供用户下载。」
- core:新增 `game::java::catalog`(8/11/17/21/25 五档 × 能承接的发行版 × 「该装哪档」),
数据全部来自 `JdkVendor::supports` 与 `vendor::order`,不复制第二份真相。
- progress:`SourceFailed` 补一个结构化的 `kind`(在这之前只有中文 `reason`,双语界面
要么放弃语言、要么放弃「哪个源为什么退避」这条用户可见信息)。
- app-iced:`downloads` 模块真下(后台线程 + `ProgressEmitter` + 快照),三态(选择列表 /
下载中 / 失败)都能说出「命中的源 / 退避原因 / 试过哪些源」;成功后重扫并(在
`java.auto_install` 开着且没有默认 JDK 时)把新装的那份设为默认。
- 三个设置键做成可改 UI:`java.installRoot` / `java.vendorPriority` / `java.auto_install`,
各自带「现在生效什么、从哪一层来」(数据目录模式 / 地区默认序),改完回读落盘值。
- `State::satisfied` 换成带方向的 `Fit`:1.12.2 + Java 21 不再被说成「低于要求」。
- i18n:删掉 `SettingsJavaEmptyBody` / `SettingsJavaAddHint` 的 markdown 反引号;
`SettingsJavaNeverScannedBody` 改成不与首屏自动扫矛盾的表述。
- 出图三张(选择列表 / 下载中 / 失败)在 DevDocs/artifacts/m197/。
顺带拆文件守 400 行:`golden/tail.rs` 的 M174 段搬到 `golden/tail_ai.rs`,
`pages/settings/java/{context,prefs,prefs_store,downloads,download_view}` 各自成模块。
This commit is contained in:
1 parent
329c529bea
commit
ce463cc9b5
33 files changed
+3839
-322
No files matched your search
@@ -70,6 +70,7 @@ impl DownloadEngine {
|
||||
self.emit(ProgressEvent::SourceFailed {
|
||||
id,
|
||||
source: candidate.source.clone(),
|
||||
kind: err.kind,
|
||||
reason: err.message.clone(),
|
||||
attempt,
|
||||
will_retry: retry,
|
||||
|
||||
@@ -264,6 +264,7 @@ impl DownloadEngine {
|
||||
self.emit(ProgressEvent::SourceFailed {
|
||||
id,
|
||||
source: candidate.source.clone(),
|
||||
kind: err.kind,
|
||||
reason: err.message.clone(),
|
||||
attempt,
|
||||
will_retry: retry,
|
||||
|
||||
@@ -45,6 +45,11 @@ pub enum ProgressEvent {
|
||||
id: DownloadId,
|
||||
/// 源标识。
|
||||
source: String,
|
||||
/// 失败分类(**结构化**:文案层按这个类型选 i18n key,`reason` 只进日志)。
|
||||
///
|
||||
/// M197 补的:在这之前只有 `reason`(core 的中文句子),GUI 要么放弃双语、
|
||||
/// 要么放弃「命中哪个源 / 为什么退避」这一条用户可见信息。
|
||||
kind: DownloadErrorKind,
|
||||
/// 失败原因(短描述)。
|
||||
reason: String,
|
||||
/// 第几次尝试(从 0 起)。
|
||||
|
||||
Reference in new issue
Block a user