Tools View & Crash Report & OOM Report

This commit is contained in:
世界
2026-04-23 08:12:52 +08:00
parent 73180f0230
commit b48f4ad97f
46 changed files with 4279 additions and 533 deletions
@@ -149,14 +149,17 @@ public struct SettingView: View {
}
#endif
@StateObject private var viewModel = SettingViewModel()
public init() {}
public var body: some View {
FormView {
Section {
ForEach([Tabs.app, Tabs.core, Tabs.packetTunnel, Tabs.onDemandRules, Tabs.profileOverride]) { it in
it.navigationLink
}
Tabs.app.navigationLink
Tabs.core.navigationLink
#if !os(tvOS)
Tabs.packetTunnel.navigationLink
#endif
Tabs.onDemandRules.navigationLink
Tabs.profileOverride.navigationLink
}
#if !os(tvOS)
Section("About") {
@@ -193,25 +196,6 @@ public struct SettingView: View {
#endif
}
#endif
Section("Debug") {
FormNavigationLink {
ServiceLogView()
} label: {
Label("Service Log", systemImage: "doc.on.clipboard")
}
FormTextItem("Taiwan Flag Available", "touchid") {
if viewModel.isLoading {
Text("Loading...")
.onAppear {
Task.detached {
await viewModel.checkTaiwanFlagAvailability()
}
}
} else {
Text(viewModel.taiwanFlagAvailable.toString())
}
}
}
}
#if os(macOS)
.formNavigationDestination(for: SettingsPage.self) { page in