-
Notifications
You must be signed in to change notification settings - Fork 15
add proxy support and fix macOS settings layout #32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Arispex
wants to merge
12
commits into
suhang12332:main
Choose a base branch
from
Arispex:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Features: - HTTP and SOCKS5 proxy support with host and port configuration - Proxy settings UI with enable/disable toggle and connection testing - NetworkManager for centralized proxy-aware network requests - ProxyAsyncImage component for proxy-aware image loading - Comprehensive localization (English and Chinese) Changes: - Add ProxySettingsManager for proxy configuration management - Add NetworkManager to handle all network requests with proxy support - Add ProxySettingsView with test connection functionality - Replace URLSession.shared usage across all services with NetworkManager - Replace AsyncImage with ProxyAsyncImage for network images - Update all network services to use proxy-aware networking - Add proxy settings tab to main settings interface - Add localized error messages for proxy connection failures
- Replace custom ProxyError enum with GlobalError.network cases - Use consistent error handling across the application - Maintain same error messages and localization keys - Improve error categorization and handling consistency
添加在 AsyncImage 转换为 ProxyAsyncImage 过程中被移除的 .onDisappear 缓存清理功能。 这可以防止项目图标在视图消失时造成内存泄漏。
- 将 Grid 布局改为 VStack + HStack 组合,解决 macOS 26 中 Grid 对齐行为改变的问题 - 为所有标签设置固定宽度和右对齐,确保布局的一致性 - 为设置页面添加水平内边距,改善视觉效果 - 统一所有设置子页面的布局样式,提升用户体验 - 修复设置项全部贴到左边的显示问题 影响范围: - GeneralSettingsView: Grid → VStack+HStack,标签宽度 200px - GameSettingsView: Grid → VStack+HStack,标签宽度 200px - ProxySettingsView: Grid → VStack+HStack,标签宽度 150px - PlayerSettingsView: Form → Grid,保持简洁 - SettingsView: 为所有标签页添加 40px 水平内边距
- 将 VStack+HStack 布局替换为 Grid 布局 - 使用 gridColumnAlignment(.trailing) 实现 Label 文本右对齐 - 通过 Grid(alignment: .center) 实现整体内容居中 - 优化 UI 元素尺寸和间距
- 将 VStack+HStack 布局替换为 Grid 布局 - 使用 gridColumnAlignment(.trailing) 实现 Label 文本右对齐 - 使用 gridColumnAlignment(.leading) 实现控件左对齐 - 通过 Grid(alignment: .center) 实现整体内容居中 - 移除不必要的 fixedSize 修饰符
- 从 SettingsView 中移除 PlayerSettingsView 标签页 - 删除 PlayerSettingsView.swift 文件 - 简化设置界面,现在只包含通用、游戏和代理三个标签页
- 将 VStack+HStack 布局替换为 Grid 布局 - 使用 gridColumnAlignment(.trailing) 实现 Label 文本右对齐 - 使用 gridColumnAlignment(.leading) 实现控件左对齐 - 通过 Grid(alignment: .center) 实现整体内容居中 - 为 URL 配置字段添加 RoundedBorderTextFieldStyle 样式 - 语言选择器设置 300px 固定宽度以保持一致性
- 更新 ProxyConfiguration 结构支持用户名密码认证 - 在 ProxySettingsManager 中添加认证字段的持久化存储 - 实现 HTTP 和 SOCKS5 代理的认证逻辑 - 更新代理测试功能支持认证验证 - 在代理设置 UI 中添加用户名和密码输入框 - 如果用户名为空则不使用认证,保持向后兼容性
- 扩展 DirectorySettingRow 支持可选的打开按钮 - 在工作目录设置的重置按钮旁边添加打开按钮 - 实现 openWorkingDirectoryInFinder 函数使用 NSWorkspace 打开目录 - 提升用户体验,方便快速访问工作目录
- NetworkManager 中缓存 URLSession 实例避免重复创建 - 添加代理配置变化监听机制,只在必要时重新创建 session - 在代理设置变化时发送通知触发 session 重新创建 - 添加正确的生命周期管理,使用 invalidateAndCancel 清理资源 - 修复下载游戏版本时内存占用从 160MB 增长到 230MB 的问题
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.
No description provided.