Skip to content

feat: 获取并显示实例安装的资源#202

Merged
AnemoFlower merged 30 commits into
CylorineStudio:mainfrom
AnemoFlower:feature/installed-resources
Jun 17, 2026
Merged

feat: 获取并显示实例安装的资源#202
AnemoFlower merged 30 commits into
CylorineStudio:mainfrom
AnemoFlower:feature/installed-resources

Conversation

@AnemoFlower

@AnemoFlower AnemoFlower commented Jun 7, 2026

Copy link
Copy Markdown
Member

closes #102

@AnemoFlower AnemoFlower marked this pull request as draft June 7, 2026 07:36
@AnemoFlower AnemoFlower marked this pull request as ready for review June 17, 2026 07:43

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

该 PR 旨在实现 Issue #102:在实例设置中获取并展示当前实例已安装的资源(Mod / 资源包 / 光影包),并补齐资源解析、远端信息查询与本地缓存等基础能力。

Changes:

  • 新增“已安装资源”页面与侧边栏入口,支持搜索、分页、打开文件位置、启用/禁用、查看远端项目信息等交互
  • 在 Core 中新增资源扫描/解析(Mod/资源包/光影)与远端信息查询服务,并引入 ResourceCache 进行资源与图标缓存持久化
  • 将原有 ProjectType 语义升级/统一为 ResourceType,并扩展 Modrinth API 客户端批量获取项目能力;同时移除部分旧工具类并以新扩展替代

Reviewed changes

Copilot reviewed 46 out of 53 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
Resources/licenses/TOMLDecoder.LICENSE.txt 新增依赖许可
PCL.Mac/Views/More/AboutPage.swift 关于页新增依赖声明
PCL.Mac/Views/Launch/InstanceSettings/InstanceSettingsSidebar.swift 实例设置新增资源入口
PCL.Mac/Views/Launch/InstanceSettings/InstalledResourcesPage.swift 已安装资源 UI 页面
PCL.Mac/Views/Download/ResourcesSearchPage.swift 搜索页类型改为 ResourceType
PCL.Mac/Views/Download/ResourceInstallPage.swift 增加跳转 Modrinth 按钮
PCL.Mac/Views/CardContainer.swift 交互状态可静态化
PCL.Mac/ViewModels/ResourcesSearchViewModel.swift 类型改为 ResourceType
PCL.Mac/ViewModels/Instance/InstanceViewModel.swift 实例/仓库状态 VM
PCL.Mac/ViewModels/Instance/InstanceListViewModel.swift 实例列表 VM
PCL.Mac/ViewModels/Instance/InstanceConfigViewModel.swift 实例配置 VM
PCL.Mac/ViewModels/Instance/InstalledResourcesViewModel.swift 已安装资源 VM(加载/分页/禁用)
PCL.Mac/Models/ResourceDisplayModel.swift 资源展示模型
PCL.Mac/Models/ProjectListItemModel.swift tag 本地化辅助
PCL.Mac/Models/ListItem.swift 列表图标支持网络/系统图标
PCL.Mac/Extensions/Localizable.swift ResourceType 本地化
PCL.Mac/Components/PaginatedContainer.swift 翻页按钮边界修正
PCL.Mac/Components/MyListItem.swift 统一图标渲染 + 新按钮组件
PCL.Mac/Assets.xcassets/Icons/iconModLogo.imageset/Contents.json 新增占位图标资源
PCL.Mac/Assets.xcassets/Controls/btnOpen.imageset/Contents.json 新增控制图标资源
PCL.Mac/Assets.xcassets/Controls/btnOpen.imageset/btnOpen.svg 新增控制图标
PCL.Mac/Assets.xcassets/Controls/btnEnable.imageset/Contents.json 新增控制图标资源
PCL.Mac/Assets.xcassets/Controls/btnEnable.imageset/btnEnable.svg 新增控制图标
PCL.Mac/Assets.xcassets/Controls/btnDisable.imageset/Contents.json 新增控制图标资源
PCL.Mac/Assets.xcassets/Controls/btnDisable.imageset/btnDisable.svg 新增控制图标
PCL.Mac/App/RootView.swift 注入静态 CardInteractionState
PCL.Mac/App/AppRouter.swift 新增 installedResources 路由
PCL.Mac/App/AppDelegate.swift 初始化/保存 ResourceCache
PCL.Mac.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved 新增 TOMLDecoder 依赖
PCL.Mac.xcodeproj/project.pbxproj 链接 TOMLDecoder 包
PCL.Mac.Core/Utils/Utils.swift 移除旧模板替换工具
PCL.Mac.Core/Utils/JarUtils.swift Manifest 解析/提取优化
PCL.Mac.Core/Utils/ArchiveUtils.swift 移除旧归档工具
PCL.Mac.Core/Services/Resource/ResourceRemoteLookupService.swift 远端资源信息查询
PCL.Mac.Core/Services/Resource/ResourceParser.swift 资源解析协议/结果模型
PCL.Mac.Core/Services/Resource/ResourceLoadService.swift 扫描/解析/缓存资源
PCL.Mac.Core/Services/Resource/Parsers/ShaderParser.swift 光影包解析
PCL.Mac.Core/Services/Resource/Parsers/ResourcepackParser.swift 资源包解析
PCL.Mac.Core/Services/Resource/Parsers/ModParser.swift Mod 解析(含 TOML)
PCL.Mac.Core/Services/ModrinthAPIClient.swift 批量获取项目接口
PCL.Mac.Core/Services/ModpackImportService.swift 归档提取方式调整
PCL.Mac.Core/Services/MinecraftInstanceLoader.swift 归档读取逻辑替换
PCL.Mac.Core/Services/ForgeInstallService.swift 模板替换方法迁移
PCL.Mac.Core/Services/Cache/ResourceCache.swift 新增资源缓存实现
PCL.Mac.Core/Models/Resource.swift 引入 Resource/ResourceType
PCL.Mac.Core/Models/Modrinth/ModrinthProject.swift ProjectType -> ResourceType
PCL.Mac.Core/Models/ModLoader.swift ModLoader 支持 Codable
PCL.Mac.Core/Models/CurseForge/CurseForgeMod.swift 补齐 CurseForge 模型字段
PCL.Mac.Core/Minecraft/Launch/MinecraftLauncher.swift 模板替换方法迁移
PCL.Mac.Core/Extensions/URL+Utils.swift 删除所有扩展名工具
PCL.Mac.Core/Extensions/String+Template.swift 占位符替换扩展
PCL.Mac.Core/Extensions/Archive+EntryExtract.swift 归档 Entry 提取扩展

Comment thread PCL.Mac.Core/Services/Resource/ResourceRemoteLookupService.swift Outdated
Comment thread PCL.Mac/ViewModels/Instance/InstalledResourcesViewModel.swift Outdated
Comment thread PCL.Mac.Core/Services/Resource/ResourceLoadService.swift Outdated
Comment thread PCL.Mac.Core/Services/ModrinthAPIClient.swift Outdated
Comment thread PCL.Mac.Core/Services/Resource/Parsers/ModParser.swift Outdated
Comment thread PCL.Mac.Core/Models/Resource.swift
Comment thread PCL.Mac.Core/Models/Resource.swift
Comment thread PCL.Mac.Core/Models/Resource.swift
@AnemoFlower AnemoFlower merged commit c89f10a into CylorineStudio:main Jun 17, 2026
1 check passed
@AnemoFlower AnemoFlower deleted the feature/installed-resources branch June 17, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] 显示实例安装的模组与资源包

2 participants