Reformat code

This commit is contained in:
世界
2026-02-08 18:23:42 +08:00
parent f765bf1e3b
commit a86dfc26d1
42 changed files with 163 additions and 98 deletions
@@ -152,7 +152,7 @@ import SwiftUI
#endif
}
@ViewBuilder private var overviewPage: some View {
private var overviewPage: some View {
OverviewView(
$coordinator.profileList,
$coordinator.selectedProfileID,
@@ -10,7 +10,9 @@ public enum DashboardCard: String, CaseIterable, Identifiable, Codable, Hashable
case clashMode
case profile
public var id: String { rawValue }
public var id: String {
rawValue
}
public var title: LocalizedStringKey {
switch self {
@@ -188,7 +188,6 @@ public struct ProfileCard: View {
#endif
}
@ViewBuilder
private func actionButtonsRow(for profile: ProfilePreview) -> some View {
HStack(spacing: actionButtonSpacing) {
editButton(for: profile)
@@ -201,7 +200,6 @@ public struct ProfileCard: View {
}
}
@ViewBuilder
private func editButton(for profile: ProfilePreview) -> some View {
Button {
viewModel.profileToEdit = profile.origin
@@ -213,7 +211,6 @@ public struct ProfileCard: View {
.actionButtonStyle()
}
@ViewBuilder
private func updateButton(for profile: ProfilePreview) -> some View {
Button {
viewModel.isUpdating = true
@@ -436,7 +433,6 @@ public struct ProfileCard: View {
}
}
@ViewBuilder
private func profileInfo(for profile: ProfilePreview) -> some View {
HStack(spacing: 8) {
HStack(spacing: 4) {
@@ -437,7 +437,6 @@ struct ProfilePickerSheet: View {
}
#if os(macOS)
@ViewBuilder
private func macOSProfileRow(_ profile: ProfilePreview) -> some View {
ProfilePickerRow(
profile: profile,
@@ -928,7 +927,6 @@ private struct ProfilePickerRow: View {
}
#if !os(tvOS)
@ViewBuilder
private var shareMenu: some View {
Menu {
#if os(macOS)
@@ -1345,7 +1343,6 @@ private struct ProfilePickerRow: View {
}
}
@ViewBuilder
private var shareMenu: some View {
Menu {
Button {
@@ -103,7 +103,7 @@ public struct ExtensionStatusView: View {
}
}
private struct StatusItem<T>: View where T: View {
private struct StatusItem<T: View>: View {
@Environment(\.colorScheme) private var colorScheme
private let title: String
@@ -48,7 +48,6 @@ public struct DashboardView: View {
#endif
}
@ViewBuilder
private func importRemoteProfileSheet(for request: ImportRemoteProfileRequest) -> some View {
NavigationSheet(title: "Import Profile", onDismiss: {
environments.profileUpdate.send()
@@ -99,7 +98,6 @@ public struct DashboardView: View {
}
}
@ViewBuilder
private var activeDashboardView: some View {
ActiveDashboardView(coordinator: coordinator)
}