feat: add third-party proxy mode and improve onboarding

This commit is contained in:
xweiba
2026-08-06 19:20:25 +08:00
parent e86909cc2f
commit b52d72bef2
36 changed files with 1946 additions and 218 deletions
+16 -3
View File
@@ -7,6 +7,8 @@ struct BugReportView: View {
@State private var isReproducible = true
@State private var isRunning = false
@State private var showCopiedAlert = false
@ObservedObject private var runtimeMode = ProxyRuntimeModeStore.shared
@ObservedObject private var thirdPartyProxy = ThirdPartyProxyManager.shared
var body: some View {
VStack(spacing: 0) {
@@ -85,9 +87,19 @@ struct BugReportView: View {
private func generateReport() {
isRunning = true
Task {
//
_ = await setup.runVerificationTest()
let testLog = setup.testLog
let testLog: String
if runtimeMode.mode == .thirdParty {
do {
let response = try await thirdPartyProxy.query()
let active = response.success && response.latitude != nil && response.longitude != nil
testLog = "第三方代理测试模式:模块连接成功;已保存坐标=\(active ? "" : "")"
} catch {
testLog = "第三方代理测试模式:模块连接失败;\(error.localizedDescription)"
}
} else {
_ = await setup.runVerificationTest()
testLog = setup.testLog
}
//
let appVersion: String = {
@@ -102,6 +114,7 @@ struct BugReportView: View {
### 环境信息
App 版本: \(appVersion)
系统版本: iOS \(systemVersion)
运行模式: \(runtimeMode.mode.displayName)
可复现环境: \(isReproducible ? "" : "")
### 问题描述