diff options
Diffstat (limited to 'Hutch/Views/Lookup')
| -rw-r--r-- | Hutch/Views/Lookup/LookupView.swift | 5 | ||||
| -rw-r--r-- | Hutch/Views/Lookup/UserProfileView.swift | 24 | ||||
| -rw-r--r-- | Hutch/Views/Lookup/UserRepositoriesView.swift | 2 | ||||
| -rw-r--r-- | Hutch/Views/Lookup/UserTrackersView.swift | 2 |
4 files changed, 32 insertions, 1 deletions
diff --git a/Hutch/Views/Lookup/LookupView.swift b/Hutch/Views/Lookup/LookupView.swift index e53dd33..f45082d 100644 --- a/Hutch/Views/Lookup/LookupView.swift +++ b/Hutch/Views/Lookup/LookupView.swift @@ -356,6 +356,7 @@ struct LookupView: View { } } .pickerStyle(.menu) + .themedRow() TextField( vm.selectedType.inputLabel, @@ -368,6 +369,7 @@ struct LookupView: View { .onSubmit { Task { await vm.lookup() } } + .themedRow() } Section { @@ -382,6 +384,7 @@ struct LookupView: View { ProgressView() } } + .themedRow() } if !vm.history.isEmpty { @@ -403,11 +406,13 @@ struct LookupView: View { } .disabled(vm.isLooking) } + .themedRow() Button("Clear History", role: .destructive) { vm.clearHistory() } .disabled(vm.isLooking) + .themedRow() } } } diff --git a/Hutch/Views/Lookup/UserProfileView.swift b/Hutch/Views/Lookup/UserProfileView.swift index 4fbb5a0..8472a90 100644 --- a/Hutch/Views/Lookup/UserProfileView.swift +++ b/Hutch/Views/Lookup/UserProfileView.swift @@ -2,6 +2,7 @@ import SwiftUI struct UserProfileView: View { @Environment(AppState.self) private var appState + @Environment(\.isAMOLEDTheme) private var isAMOLED @AppStorage(AppStorageKeys.contributionGraphsEnabled, store: .standard) private var contributionGraphsEnabled = true let user: User @@ -55,33 +56,41 @@ struct UserProfileView: View { } Spacer() } - .listRowBackground(Color.clear) + .listRowBackground(isAMOLED ? Color.black : Color.clear) } } Section { LabeledContent("Username", value: user.username) + .themedRow() LabeledContent("Canonical Name", value: user.canonicalName) + .themedRow() if let userType = user.userType { LabeledContent("User Type", value: userType) + .themedRow() } if let pronouns = user.pronouns { LabeledContent("Pronouns", value: pronouns) + .themedRow() } if let suspensionNotice = user.suspensionNotice { LabeledContent("Suspension Notice", value: suspensionNotice) + .themedRow() } } Section { LabeledContent("Email", value: user.email) + .themedRow() if let urlString = user.url, let url = URL(string: urlString) { LabeledContent("URL") { Link(urlString, destination: url) } + .themedRow() } if let location = user.location { LabeledContent("Location", value: location) + .themedRow() } } @@ -91,6 +100,7 @@ struct UserProfileView: View { .frame(maxWidth: .infinity, alignment: .leading) .tint(.accentColor) .textSelection(.enabled) + .themedRow() } } @@ -98,9 +108,11 @@ struct UserProfileView: View { Section { if let created = user.created { LabeledContent("Joined", value: formattedTimestamp(created)) + .themedRow() } if let updated = user.updated { LabeledContent("Updated", value: formattedTimestamp(updated)) + .themedRow() } } } @@ -118,15 +130,18 @@ struct UserProfileView: View { error: viewModel.contributionsError ?? viewModel.contributionStatusText, isIndexedButEmpty: viewModel.isContributionActivityIndexedButEmpty ) + .themedRow() } } Section { if viewModel.isLoadingRepositories && viewModel.repositories.isEmpty { ProgressView() + .themedRow() } else if viewModel.repositories.isEmpty { Text("No public repositories.") .foregroundStyle(.secondary) + .themedRow() } else { ForEach(viewModel.repositories.prefix(4)) { repo in NavigationLink { @@ -137,10 +152,12 @@ struct UserProfileView: View { RepositoryRowView(repository: repo, buildStatus: .none) } } + .themedRow() if viewModel.repositories.count > 4 { NavigationLink("See All") { UserRepositoriesView(viewModel: viewModel) } + .themedRow() } } } header: { @@ -150,9 +167,11 @@ struct UserProfileView: View { Section { if viewModel.isLoadingTrackers && viewModel.trackers.isEmpty { ProgressView() + .themedRow() } else if viewModel.trackers.isEmpty { Text("No public trackers.") .foregroundStyle(.secondary) + .themedRow() } else { ForEach(viewModel.trackers.prefix(4)) { tracker in NavigationLink { @@ -161,10 +180,12 @@ struct UserProfileView: View { UserProfileTrackerRowView(tracker: tracker) } } + .themedRow() if viewModel.trackers.count > 4 { NavigationLink("See All") { UserTrackersView(viewModel: viewModel) } + .themedRow() } } } header: { @@ -172,6 +193,7 @@ struct UserProfileView: View { } } } + .themedList() .listStyle(.insetGrouped) .navigationTitle(user.canonicalName) .navigationBarTitleDisplayMode(.inline) diff --git a/Hutch/Views/Lookup/UserRepositoriesView.swift b/Hutch/Views/Lookup/UserRepositoriesView.swift index 7aeea10..c2ca65c 100644 --- a/Hutch/Views/Lookup/UserRepositoriesView.swift +++ b/Hutch/Views/Lookup/UserRepositoriesView.swift @@ -14,7 +14,9 @@ struct UserRepositoriesView: View { RepositoryRowView(repository: repo, buildStatus: .none) } } + .themedRow() } + .themedList() .listStyle(.plain) .navigationTitle("Repositories") .navigationBarTitleDisplayMode(.inline) diff --git a/Hutch/Views/Lookup/UserTrackersView.swift b/Hutch/Views/Lookup/UserTrackersView.swift index 17916da..c98d839 100644 --- a/Hutch/Views/Lookup/UserTrackersView.swift +++ b/Hutch/Views/Lookup/UserTrackersView.swift @@ -12,7 +12,9 @@ struct UserTrackersView: View { UserProfileTrackerRowView(tracker: tracker) } } + .themedRow() } + .themedList() .listStyle(.plain) .navigationTitle("Trackers") .navigationBarTitleDisplayMode(.inline) |
