diff --git a/crates/app-iced/src/pages/download/demo.rs b/crates/app-iced/src/pages/download/demo.rs index 110eb95..79e827f 100644 --- a/crates/app-iced/src/pages/download/demo.rs +++ b/crates/app-iced/src/pages/download/demo.rs @@ -21,6 +21,7 @@ //! 取值:`ready`(缺省)/ `loading` / `empty` / `selected` / `category-release` / `installing` / //! `installing-late` / `installing-empty` / `failed` / `done` / `done-next` / //! **`options` / `options-fabric` / `options-incompat`**(M105 的安装选项区三态)/ +//! **`options-liteloader`**(M222:LiteLoader 已可装,取样点用它的最高原版 1.12.2)/ //! **`category-ancient` / `search` / `search-major` / `search-empty` / `search-elsewhere`** //! (M107 的两级侧栏与搜索取样点)。 //! @@ -81,6 +82,8 @@ pub fn demo(catalog: Catalog) -> Download { ), // NeoForge 最早只到 1.20.1,远古版(列表里的 `rd-132211`)根本没有构建 ⇒ 选中即报原因 Some("options-incompat") => options(catalog, "rd-132211", Loader::NeoForge, None), + // M222 的取样点:选中 1.12.2 + LiteLoader(外加「这里只叠原版」那条中性说明) + Some("options-liteloader") => options_liteloader(catalog), Some("selected") => Download { selected: Some("1.21.9".to_string()), ..ready(catalog) @@ -169,6 +172,37 @@ fn options(catalog: Catalog, version: &str, loader: Loader, cached: Option Download { + const MC: &str = "1.12.2"; + let mut versions = demo_versions(); + versions.push(VersionSummary { + id: MC.to_string(), + kind: VersionKind::Release, + released: "2017-09-18".to_string(), + installed: false, + }); + let mut state = AppState::new(); + state.apply(AppEvent::Core(CoreEvent::VersionListChanged(versions))); + // 真版本表里 LiteLoader 对 1.12.2 只有这一条(快照分支),照实写。 + state.apply(AppEvent::Core(CoreEvent::LoaderVersions { + kind: Loader::LiteLoader.kind(), + mc_version: MC.to_string(), + result: Ok(vec!["1.12.2-SNAPSHOT".to_string()]), + })); + let draft = InstallDraft { + selected: Some(MC.to_string()), + loader: Loader::LiteLoader, + ..InstallDraft::default() + }; + Download::from_snapshot(&state, Category::All, &draft, catalog) +} + /// 22 个主版本桶(`1.21 … 1.0`)的清单:chips 档的横向滚动取证用。 fn many(catalog: Catalog) -> Download { let versions = (0..=21)