Skip to content

Conversation

@Arispex
Copy link
Contributor

@Arispex Arispex commented Aug 29, 2025

No description provided.

Arispex added 12 commits August 27, 2025 23:22
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant