Refactor profile management

This commit is contained in:
世界
2025-12-03 11:15:56 +08:00
parent adf4e5c75c
commit 727136f187
22 changed files with 1635 additions and 787 deletions
@@ -35,7 +35,7 @@ public struct DashboardView: View {
.onChangeCompat(of: importRemoteProfile.wrappedValue) { _ in
handleImportRemoteProfile()
}
#if os(tvOS)
#if os(tvOS)
.navigationDestination(item: $importRemoteProfileRequest) { request in
NewProfileView(request)
.environmentObject(environments)
@@ -48,16 +48,16 @@ public struct DashboardView: View {
}
}
}
#else
#else
.sheet(item: $importRemoteProfileRequest) { request in
importRemoteProfileSheet(for: request)
}
#endif
importRemoteProfileSheet(for: request)
}
#endif
#if os(macOS)
.onChangeCompat(of: controlActiveState) { state in
guard state != .inactive, Variant.useSystemExtension, !coordinator.isLoading else { return }
Task { await coordinator.reload() }
}
}
#endif
}