feat: 为联机功能添加帮助文档链接与地区检查#66
Merged
AnemoFlower merged 8 commits intoCeciliaStudio:mainfrom Feb 7, 2026
Merged
Conversation
使用 CloudFlare API 进行了简单的地区检查。 没有使用 CoreLocation,因为 EasyTier 官方节点貌似也会进行地区检查。
There was a problem hiding this comment.
Pull request overview
本 PR 旨在完善联机页面的可用性与合规性:新增“帮助文档”入口,并在进入联机流程前加入地区(中国大陆)限制检查;同时顺带调整了一些通用 UI 组件以改善显示效果(例如列表图标清晰度、输入框组件)。
Changes:
- 联机页新增“帮助文档”按钮,点击打开指定教程链接;并在联机免责声明检查中加入地区限制检查。
- 将
ListItem的图标来源从NSImage调整为资源名String,以配合 SwiftUIImage(...)渲染(改善图标显示效果/清晰度)。 - MessageBox 的输入框由
TextField切换为MyTextField,并微调弹窗阴影与内容 padding。
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| PCL.Mac/Views/Multiplayer/MultiplayerPage.swift | 联机入口 UI 更新:加载文案初始化、帮助文档入口、地区检查接入免责声明流程 |
| PCL.Mac.Core/Utils/LocaleUtils.swift | 新增基于 Cloudflare trace 的地区判断逻辑,并引入缓存与严格模式参数 |
| PCL.Mac/Models/ListItem.swift | ListItem.image 类型从 NSImage? 改为 String?(资源名) |
| PCL.Mac/Components/MyListItem.swift | 列表项图标渲染从 Image(nsImage:) 改为 Image(name) |
| PCL.Mac/Views/Download/MinecraftDownloadPage.swift | 列表项构造适配新的 ListItem.image 类型 |
| PCL.Mac/Views/Launch/InstanceList/InstanceListPage.swift | 同上:实例列表项图标参数适配 |
| PCL.Mac/Views/Launch/InstanceSettings/InstanceConfigPage.swift | 同上:实例配置页头部列表项适配 |
| PCL.Mac/ViewModels/AccountViewModel.swift | 同上:账号类型选择列表项适配 |
| PCL.Mac/ViewModels/MultiplayerViewModel.swift | 默认玩家名改为 Anonymous;EasyTier 退出码判断逻辑调整 |
| PCL.Mac/Views/MessageBoxView.swift | 弹窗样式调整(阴影、padding)与输入控件切换为 MyTextField |
| PCL.Mac/ContentView.swift | 移除 MessageBoxView 外层阴影(迁移到 MessageBoxView 内部实现) |
| PCL.Mac/Components/MyTextField.swift | 新增 immediately 行为、细节交互与绘制调整(边框/占位符点击穿透等) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
本 PR 为联机页面增加了一个“帮助文档”按钮,点击后会打开 https://ceciliastudio.top/helps/PCL.Mac#联机 ,并添加了地区检查,禁止在非中国大陆地区使用。
closes #63
fixes #65