Commit a07148fa91
Unsigned
Layout: unified · split
Hutch.xcodeproj/project.pbxproj +8 −8
| @@ -515,7 +515,7 @@ | ||
| 515 | 515 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; |
| 516 | 516 | CODE_SIGN_ENTITLEMENTS = Hutch/Hutch.entitlements; |
| 517 | 517 | CODE_SIGN_STYLE = Automatic; |
| 518 | CURRENT_PROJECT_VERSION = 67; | |
| 518 | CURRENT_PROJECT_VERSION = 68; | |
| 519 | 519 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 520 | 520 | ENABLE_PREVIEWS = YES; |
| 521 | 521 | GENERATE_INFOPLIST_FILE = YES; |
| @@ -532,7 +532,7 @@ | ||
| 532 | 532 | "$(inherited)", |
| 533 | 533 | "@executable_path/Frameworks", |
| 534 | 534 | ); |
| 535 | MARKETING_VERSION = 3.0.6; | |
| 535 | MARKETING_VERSION = 3.1.0; | |
| 536 | 536 | PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch; |
| 537 | 537 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 538 | 538 | STRING_CATALOG_GENERATE_SYMBOLS = YES; |
| @@ -552,7 +552,7 @@ | ||
| 552 | 552 | ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; |
| 553 | 553 | CODE_SIGN_ENTITLEMENTS = Hutch/Hutch.entitlements; |
| 554 | 554 | CODE_SIGN_STYLE = Automatic; |
| 555 | CURRENT_PROJECT_VERSION = 67; | |
| 555 | CURRENT_PROJECT_VERSION = 68; | |
| 556 | 556 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 557 | 557 | ENABLE_PREVIEWS = YES; |
| 558 | 558 | GENERATE_INFOPLIST_FILE = YES; |
| @@ -569,7 +569,7 @@ | ||
| 569 | 569 | "$(inherited)", |
| 570 | 570 | "@executable_path/Frameworks", |
| 571 | 571 | ); |
| 572 | MARKETING_VERSION = 3.0.6; | |
| 572 | MARKETING_VERSION = 3.1.0; | |
| 573 | 573 | PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch; |
| 574 | 574 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 575 | 575 | STRING_CATALOG_GENERATE_SYMBOLS = YES; |
| @@ -632,7 +632,7 @@ | ||
| 632 | 632 | APPLICATION_EXTENSION_API_ONLY = YES; |
| 633 | 633 | CODE_SIGN_ENTITLEMENTS = HutchWidgetExtension/HutchWidgetExtension.entitlements; |
| 634 | 634 | CODE_SIGN_STYLE = Automatic; |
| 635 | CURRENT_PROJECT_VERSION = 67; | |
| 635 | CURRENT_PROJECT_VERSION = 68; | |
| 636 | 636 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 637 | 637 | GENERATE_INFOPLIST_FILE = NO; |
| 638 | 638 | INFOPLIST_FILE = HutchWidgetExtension/Info.plist; |
| @@ -642,7 +642,7 @@ | ||
| 642 | 642 | "@executable_path/Frameworks", |
| 643 | 643 | "@executable_path/../../Frameworks", |
| 644 | 644 | ); |
| 645 | MARKETING_VERSION = 3.0.6; | |
| 645 | MARKETING_VERSION = 3.1.0; | |
| 646 | 646 | PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch.HutchWidgetExtension; |
| 647 | 647 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 648 | 648 | SKIP_INSTALL = YES; |
| @@ -661,7 +661,7 @@ | ||
| 661 | 661 | APPLICATION_EXTENSION_API_ONLY = YES; |
| 662 | 662 | CODE_SIGN_ENTITLEMENTS = HutchWidgetExtension/HutchWidgetExtension.entitlements; |
| 663 | 663 | CODE_SIGN_STYLE = Automatic; |
| 664 | CURRENT_PROJECT_VERSION = 67; | |
| 664 | CURRENT_PROJECT_VERSION = 68; | |
| 665 | 665 | DEVELOPMENT_TEAM = ZCNAX3VL9D; |
| 666 | 666 | GENERATE_INFOPLIST_FILE = NO; |
| 667 | 667 | INFOPLIST_FILE = HutchWidgetExtension/Info.plist; |
| @@ -671,7 +671,7 @@ | ||
| 671 | 671 | "@executable_path/Frameworks", |
| 672 | 672 | "@executable_path/../../Frameworks", |
| 673 | 673 | ); |
| 674 | MARKETING_VERSION = 3.0.6; | |
| 674 | MARKETING_VERSION = 3.1.0; | |
| 675 | 675 | PRODUCT_BUNDLE_IDENTIFIER = net.cleberg.Hutch.HutchWidgetExtension; |
| 676 | 676 | PRODUCT_NAME = "$(TARGET_NAME)"; |
| 677 | 677 | SKIP_INSTALL = YES; |
Hutch/App/HutchApp.swift +2
| @@ -13,7 +13,9 @@ struct HutchApp: App { | ||
| 13 | 13 | .environment(appState) |
| 14 | 14 | .environment(networkMonitor) |
| 15 | 15 | .environment(\.displayDensity, displayDensity) |
| 16 | .environment(\.isAMOLEDTheme, appTheme == .amoled) | |
| 16 | 17 | .environment(\.defaultMinListRowHeight, displayDensity == .compact ? 36 : 44) |
| 18 | .background(appTheme == .amoled ? Color.black : Color.clear) | |
| 17 | 19 | .preferredColorScheme(appTheme.colorScheme) |
| 18 | 20 | .onOpenURL { url in |
| 19 | 21 | if let link = DeepLink(url: url) { |
Hutch/App/RootView.swift +21
| @@ -4,6 +4,7 @@ import SwiftUI | ||
| 4 | 4 | /// full-screen sheet for token entry on first launch. |
| 5 | 5 | struct RootView: View { |
| 6 | 6 | @Environment(AppState.self) private var appState |
| 7 | @Environment(\.isAMOLEDTheme) private var isAMOLED | |
| 7 | 8 | @State private var homePath = NavigationPath() |
| 8 | 9 | @State private var morePath = NavigationPath() |
| 9 | 10 | @State private var repoPath = NavigationPath() |
| @@ -125,6 +126,7 @@ struct RootView: View { | ||
| 125 | 126 | .id(appState.sessionIdentity) |
| 126 | 127 | .defaultAppStorage(appState.accountDefaults) |
| 127 | 128 | .modifier(SidebarAdaptableTabStyle()) |
| 129 | .modifier(AMOLEDToolbarStyle(isAMOLED: isAMOLED)) | |
| 128 | 130 | .modifier(TabKeyboardShortcuts(selectedTab: Binding( |
| 129 | 131 | get: { appState.selectedTab }, |
| 130 | 132 | set: { appState.selectedTab = $0 } |
| @@ -427,6 +429,25 @@ private struct TabKeyboardShortcuts: ViewModifier { | ||
| 427 | 429 | } |
| 428 | 430 | } |
| 429 | 431 | |
| 432 | // MARK: - AMOLED Toolbar Styling | |
| 433 | ||
| 434 | /// Applies true-black backgrounds to the tab bar and navigation bar when the AMOLED theme is active. | |
| 435 | private struct AMOLEDToolbarStyle: ViewModifier { | |
| 436 | let isAMOLED: Bool | |
| 437 | ||
| 438 | func body(content: Content) -> some View { | |
| 439 | if isAMOLED { | |
| 440 | content | |
| 441 | .toolbarBackground(Color.black, for: .tabBar) | |
| 442 | .toolbarBackground(.visible, for: .tabBar) | |
| 443 | .toolbarBackground(Color.black, for: .navigationBar) | |
| 444 | .toolbarBackground(.visible, for: .navigationBar) | |
| 445 | } else { | |
| 446 | content | |
| 447 | } | |
| 448 | } | |
| 449 | } | |
| 450 | ||
| 430 | 451 | // MARK: - iPad Sidebar Adaptable |
| 431 | 452 | |
| 432 | 453 | /// Applies `.tabViewStyle(.sidebarAdaptable)` on iOS 18+ so the tab bar |
Hutch/App/ThemeManager.swift +48 −1
| @@ -6,6 +6,7 @@ enum AppTheme: String, CaseIterable, Identifiable { | ||
| 6 | 6 | case system |
| 7 | 7 | case light |
| 8 | 8 | case dark |
| 9 | case amoled | |
| 9 | 10 | |
| 10 | 11 | var id: String { rawValue } |
| 11 | 12 | |
| @@ -14,6 +15,7 @@ enum AppTheme: String, CaseIterable, Identifiable { | ||
| 14 | 15 | case .system: "System" |
| 15 | 16 | case .light: "Light" |
| 16 | 17 | case .dark: "Dark" |
| 18 | case .amoled: "AMOLED" | |
| 17 | 19 | } |
| 18 | 20 | } |
| 19 | 21 | |
| @@ -22,6 +24,7 @@ enum AppTheme: String, CaseIterable, Identifiable { | ||
| 22 | 24 | case .system: nil |
| 23 | 25 | case .light: .light |
| 24 | 26 | case .dark: .dark |
| 27 | case .amoled: .dark | |
| 25 | 28 | } |
| 26 | 29 | } |
| 27 | 30 | } |
| @@ -46,25 +49,51 @@ private struct DisplayDensityKey: EnvironmentKey { | ||
| 46 | 49 | static let defaultValue: DisplayDensity = .standard |
| 47 | 50 | } |
| 48 | 51 | |
| 52 | private struct IsAMOLEDThemeKey: EnvironmentKey { | |
| 53 | static let defaultValue: Bool = false | |
| 54 | } | |
| 55 | ||
| 49 | 56 | extension EnvironmentValues { |
| 50 | 57 | var displayDensity: DisplayDensity { |
| 51 | 58 | get { self[DisplayDensityKey.self] } |
| 52 | 59 | set { self[DisplayDensityKey.self] = newValue } |
| 53 | 60 | } |
| 61 | ||
| 62 | var isAMOLEDTheme: Bool { | |
| 63 | get { self[IsAMOLEDThemeKey.self] } | |
| 64 | set { self[IsAMOLEDThemeKey.self] = newValue } | |
| 65 | } | |
| 54 | 66 | } |
| 55 | 67 | |
| 56 | 68 | // MARK: - Themed List Modifier |
| 57 | 69 | |
| 58 | /// Combined modifier for List/Form that applies compact section spacing. | |
| 70 | /// Combined modifier for List/Form that applies compact section spacing and AMOLED black backgrounds. | |
| 59 | 71 | /// Apply once per List or Form. |
| 60 | 72 | struct ThemedListStyle: ViewModifier { |
| 61 | 73 | @Environment(\.displayDensity) private var density |
| 74 | @Environment(\.isAMOLEDTheme) private var isAMOLED | |
| 62 | 75 | |
| 63 | 76 | func body(content: Content) -> some View { |
| 64 | 77 | content |
| 65 | 78 | .listSectionSpacing(density == .compact ? .compact : .default) |
| 66 | 79 | .contentMargins(.vertical, density == .compact ? 2 : 8, for: .scrollContent) |
| 67 | 80 | .controlSize(density == .compact ? .small : .regular) |
| 81 | .modifier(AMOLEDListBackground(isAMOLED: isAMOLED)) | |
| 82 | } | |
| 83 | } | |
| 84 | ||
| 85 | /// Hides the default grouped list background and replaces it with true black for OLED screens. | |
| 86 | private struct AMOLEDListBackground: ViewModifier { | |
| 87 | let isAMOLED: Bool | |
| 88 | ||
| 89 | func body(content: Content) -> some View { | |
| 90 | if isAMOLED { | |
| 91 | content | |
| 92 | .scrollContentBackground(.hidden) | |
| 93 | .background(Color.black) | |
| 94 | } else { | |
| 95 | content | |
| 96 | } | |
| 68 | 97 | } |
| 69 | 98 | } |
| 70 | 99 | |
| @@ -74,3 +103,21 @@ extension View { | ||
| 74 | 103 | modifier(ThemedListStyle()) |
| 75 | 104 | } |
| 76 | 105 | } |
| 106 | ||
| 107 | // MARK: - Themed Row Modifier | |
| 108 | ||
| 109 | struct ThemedRowStyle: ViewModifier { | |
| 110 | @Environment(\.isAMOLEDTheme) private var isAMOLED | |
| 111 | ||
| 112 | func body(content: Content) -> some View { | |
| 113 | content | |
| 114 | .listRowBackground(isAMOLED ? Color.black : nil) | |
| 115 | } | |
| 116 | } | |
| 117 | ||
| 118 | extension View { | |
| 119 | /// Apply to each row view inside a List or Form section to get a true-black background in AMOLED mode. | |
| 120 | func themedRow() -> some View { | |
| 121 | modifier(ThemedRowStyle()) | |
| 122 | } | |
| 123 | } | |
Hutch/Views/Auth/AuthView.swift +7
| @@ -15,6 +15,7 @@ struct TokenEntryView: View { | ||
| 15 | 15 | Form { |
| 16 | 16 | Section { |
| 17 | 17 | Text("Enter your SourceHut personal access token to connect.") |
| 18 | .themedRow() | |
| 18 | 19 | } header: { |
| 19 | 20 | Text("Welcome to Hutch") |
| 20 | 21 | } footer: { |
| @@ -27,6 +28,7 @@ struct TokenEntryView: View { | ||
| 27 | 28 | .autocorrectionDisabled() |
| 28 | 29 | .textInputAutocapitalization(.never) |
| 29 | 30 | .disabled(isConnecting) |
| 31 | .themedRow() | |
| 30 | 32 | } header: { |
| 31 | 33 | Text("Token") |
| 32 | 34 | } |
| @@ -40,6 +42,7 @@ struct TokenEntryView: View { | ||
| 40 | 42 | .foregroundStyle(.red) |
| 41 | 43 | } |
| 42 | 44 | .foregroundStyle(.red) |
| 45 | .themedRow() | |
| 43 | 46 | } |
| 44 | 47 | } |
| 45 | 48 | |
| @@ -56,22 +59,26 @@ struct TokenEntryView: View { | ||
| 56 | 59 | } |
| 57 | 60 | } |
| 58 | 61 | .disabled(tokenTrimmed.isEmpty || isConnecting) |
| 62 | .themedRow() | |
| 59 | 63 | } |
| 60 | 64 | |
| 61 | 65 | Section { |
| 62 | 66 | Link(destination: createAccountURL) { |
| 63 | 67 | Label("Create SourceHut account", systemImage: "person.badge.plus") |
| 64 | 68 | } |
| 69 | .themedRow() | |
| 65 | 70 | |
| 66 | 71 | Link(destination: personalAccessTokensURL) { |
| 67 | 72 | Label("Create Personal Access Token", systemImage: "key") |
| 68 | 73 | } |
| 74 | .themedRow() | |
| 69 | 75 | } header: { |
| 70 | 76 | Text("Need an account?") |
| 71 | 77 | } footer: { |
| 72 | 78 | Text("These links open SourceHut in your browser. After signing up, create a Personal Access Token there and paste it here.") |
| 73 | 79 | } |
| 74 | 80 | } |
| 81 | .themedList() | |
| 75 | 82 | .navigationTitle("Hutch") |
| 76 | 83 | } |
| 77 | 84 | } |
Hutch/Views/Builds/BuildDetailView.swift +25
| @@ -176,26 +176,34 @@ struct BuildDetailView: View { | ||
| 176 | 176 | .font(.subheadline.weight(.medium)) |
| 177 | 177 | } |
| 178 | 178 | } |
| 179 | .themedRow() | |
| 179 | 180 | |
| 180 | 181 | if let note = job.note, !note.isEmpty { |
| 181 | 182 | LabeledContent("Note", value: note) |
| 183 | .themedRow() | |
| 182 | 184 | } |
| 183 | 185 | |
| 184 | 186 | if let image = job.image { |
| 185 | 187 | LabeledContent("Image", value: image) |
| 188 | .themedRow() | |
| 186 | 189 | } |
| 187 | 190 | |
| 188 | 191 | if !job.tags.isEmpty { |
| 189 | 192 | LabeledContent("Tags", value: job.tags.joined(separator: ", ")) |
| 193 | .themedRow() | |
| 190 | 194 | } |
| 191 | 195 | |
| 192 | 196 | if let visibility = job.visibility { |
| 193 | 197 | LabeledContent("Visibility", value: visibility.rawValue.capitalized) |
| 198 | .themedRow() | |
| 194 | 199 | } |
| 195 | 200 | |
| 196 | 201 | LabeledContent("Owner", value: job.owner.canonicalName) |
| 202 | .themedRow() | |
| 197 | 203 | LabeledContent("Created", value: job.created.relativeDescription) |
| 204 | .themedRow() | |
| 198 | 205 | LabeledContent("Updated", value: job.updated.relativeDescription) |
| 206 | .themedRow() | |
| 199 | 207 | } |
| 200 | 208 | |
| 201 | 209 | if appState.isDebugModeEnabled { |
| @@ -211,9 +219,11 @@ struct BuildDetailView: View { | ||
| 211 | 219 | url: \(SRHTWebURL.build(jobId: job.id, ownerCanonicalName: job.owner.canonicalName)?.absoluteString ?? "unavailable") |
| 212 | 220 | """ |
| 213 | 221 | ) |
| 222 | .themedRow() | |
| 214 | 223 | |
| 215 | 224 | if let rawJobResponse = viewModel.rawJobResponse { |
| 216 | 225 | DebugTextBlock(title: "Raw Response", content: rawJobResponse) |
| 226 | .themedRow() | |
| 217 | 227 | } |
| 218 | 228 | } |
| 219 | 229 | } |
| @@ -237,6 +247,7 @@ struct BuildDetailView: View { | ||
| 237 | 247 | } |
| 238 | 248 | } |
| 239 | 249 | .disabled(isOpeningRepository) |
| 250 | .themedRow() | |
| 240 | 251 | } |
| 241 | 252 | } |
| 242 | 253 | |
| @@ -248,6 +259,7 @@ struct BuildDetailView: View { | ||
| 248 | 259 | openURL(url) |
| 249 | 260 | } |
| 250 | 261 | } |
| 262 | .themedRow() | |
| 251 | 263 | } header: { |
| 252 | 264 | Text("Artifacts") |
| 253 | 265 | } footer: { |
| @@ -275,6 +287,7 @@ struct BuildDetailView: View { | ||
| 275 | 287 | } |
| 276 | 288 | } |
| 277 | 289 | .foregroundStyle(.primary) |
| 290 | .themedRow() | |
| 278 | 291 | } header: { |
| 279 | 292 | HStack(spacing: 6) { |
| 280 | 293 | TaskStatusIcon(status: task.status) |
| @@ -299,6 +312,7 @@ struct BuildDetailView: View { | ||
| 299 | 312 | } |
| 300 | 313 | } |
| 301 | 314 | .disabled(viewModel.isCancelling) |
| 315 | .themedRow() | |
| 302 | 316 | } |
| 303 | 317 | } |
| 304 | 318 | |
| @@ -319,6 +333,7 @@ struct BuildDetailView: View { | ||
| 319 | 333 | } |
| 320 | 334 | } |
| 321 | 335 | .disabled(viewModel.isRebuilding) |
| 336 | .themedRow() | |
| 322 | 337 | |
| 323 | 338 | Button { |
| 324 | 339 | showEditResubmitSheet = true |
| @@ -326,11 +341,13 @@ struct BuildDetailView: View { | ||
| 326 | 341 | Text("Edit & Resubmit") |
| 327 | 342 | } |
| 328 | 343 | .disabled(viewModel.isSubmittingEditedBuild) |
| 344 | .themedRow() | |
| 329 | 345 | } footer: { |
| 330 | 346 | Text("Creates a new build using this job’s saved manifest, tags, note, and visibility.") |
| 331 | 347 | } |
| 332 | 348 | } |
| 333 | 349 | } |
| 350 | .themedList() | |
| 334 | 351 | .task(id: job.id) { |
| 335 | 352 | RecentActivityStore.recordBuild( |
| 336 | 353 | jobId: job.id, |
| @@ -463,26 +480,33 @@ private struct EditResubmitBuildSheet: View { | ||
| 463 | 480 | .lineLimit(12...24) |
| 464 | 481 | .textInputAutocapitalization(.never) |
| 465 | 482 | .autocorrectionDisabled() |
| 483 | .themedRow() | |
| 466 | 484 | } |
| 467 | 485 | |
| 468 | 486 | Section("Build Options") { |
| 469 | 487 | TextField("Note (optional)", text: $note) |
| 488 | .themedRow() | |
| 470 | 489 | TextField("Tags (comma-separated, optional)", text: $tagsText) |
| 471 | 490 | .textInputAutocapitalization(.never) |
| 472 | 491 | .autocorrectionDisabled() |
| 492 | .themedRow() | |
| 473 | 493 | Picker("Visibility", selection: $visibility) { |
| 474 | 494 | Text("Public").tag(Visibility.public) |
| 475 | 495 | Text("Unlisted").tag(Visibility.unlisted) |
| 476 | 496 | Text("Private").tag(Visibility.private) |
| 477 | 497 | } |
| 498 | .themedRow() | |
| 478 | 499 | Toggle("Start build now", isOn: $execute) |
| 500 | .themedRow() | |
| 479 | 501 | Toggle("Allow build secrets", isOn: $secrets) |
| 502 | .themedRow() | |
| 480 | 503 | } |
| 481 | 504 | |
| 482 | 505 | Section { |
| 483 | 506 | Text("This submits a new build. “Start build now” and “Allow build secrets” use local defaults because the current job does not include those original values.") |
| 484 | 507 | .font(.footnote) |
| 485 | 508 | .foregroundStyle(.secondary) |
| 509 | .themedRow() | |
| 486 | 510 | } |
| 487 | 511 | |
| 488 | 512 | if let actionError = viewModel.actionError { |
| @@ -494,6 +518,7 @@ private struct EditResubmitBuildSheet: View { | ||
| 494 | 518 | .foregroundStyle(.red) |
| 495 | 519 | } |
| 496 | 520 | .foregroundStyle(.red) |
| 521 | .themedRow() | |
| 497 | 522 | } |
| 498 | 523 | } |
| 499 | 524 | } |
Hutch/Views/Builds/BuildListView.swift +13 −1
| @@ -5,6 +5,7 @@ struct BuildListView: View { | ||
| 5 | 5 | @AppStorage(AppStorageKeys.buildsAutoRefreshInterval) private var autoRefreshRawValue = 0 |
| 6 | 6 | @AppStorage(AppStorageKeys.buildsRepoFilter) private var savedRepoFilter = "" |
| 7 | 7 | @Environment(AppState.self) private var appState |
| 8 | @Environment(\.isAMOLEDTheme) private var isAMOLED | |
| 8 | 9 | @State private var viewModel: BuildListViewModel? |
| 9 | 10 | @State private var showSubmitSheet = false |
| 10 | 11 | @State private var submittedJobId: Int? |
| @@ -134,7 +135,7 @@ struct BuildListView: View { | ||
| 134 | 135 | .padding(.top, 6) |
| 135 | 136 | .padding(.bottom, 10) |
| 136 | 137 | .listRowInsets(EdgeInsets()) |
| 137 | .listRowBackground(Color.clear) | |
| 138 | .listRowBackground(isAMOLED ? Color.black : Color.clear) | |
| 138 | 139 | .listRowSeparator(.hidden) |
| 139 | 140 | |
| 140 | 141 | ForEach(viewModel.filteredJobs) { job in |
| @@ -181,6 +182,7 @@ struct BuildListView: View { | ||
| 181 | 182 | await viewModel.loadMoreIfNeeded(currentItem: job) |
| 182 | 183 | } |
| 183 | 184 | } |
| 185 | .themedRow() | |
| 184 | 186 | |
| 185 | 187 | if viewModel.isLoadingMore { |
| 186 | 188 | HStack { |
| @@ -189,6 +191,7 @@ struct BuildListView: View { | ||
| 189 | 191 | Spacer() |
| 190 | 192 | } |
| 191 | 193 | .listRowSeparator(.hidden) |
| 194 | .themedRow() | |
| 192 | 195 | } |
| 193 | 196 | } |
| 194 | 197 | } |
| @@ -279,26 +282,33 @@ private struct SubmitBuildSheet: View { | ||
| 279 | 282 | .lineLimit(12...24) |
| 280 | 283 | .textInputAutocapitalization(.never) |
| 281 | 284 | .autocorrectionDisabled() |
| 285 | .themedRow() | |
| 282 | 286 | } |
| 283 | 287 | |
| 284 | 288 | Section("Build Options") { |
| 285 | 289 | TextField("Note (optional)", text: $note) |
| 290 | .themedRow() | |
| 286 | 291 | TextField("Tags (comma-separated, optional)", text: $tagsText) |
| 287 | 292 | .textInputAutocapitalization(.never) |
| 288 | 293 | .autocorrectionDisabled() |
| 294 | .themedRow() | |
| 289 | 295 | Picker("Visibility", selection: $visibility) { |
| 290 | 296 | Text("Public").tag(Visibility.public) |
| 291 | 297 | Text("Unlisted").tag(Visibility.unlisted) |
| 292 | 298 | Text("Private").tag(Visibility.private) |
| 293 | 299 | } |
| 300 | .themedRow() | |
| 294 | 301 | Toggle("Start build now", isOn: $execute) |
| 302 | .themedRow() | |
| 295 | 303 | Toggle("Allow build secrets", isOn: $secrets) |
| 304 | .themedRow() | |
| 296 | 305 | } |
| 297 | 306 | |
| 298 | 307 | Section { |
| 299 | 308 | Text("You need a valid builds.sr.ht manifest and a token with BUILDS:RW.") |
| 300 | 309 | .font(.footnote) |
| 301 | 310 | .foregroundStyle(.secondary) |
| 311 | .themedRow() | |
| 302 | 312 | } |
| 303 | 313 | |
| 304 | 314 | if let error = viewModel.error { |
| @@ -310,9 +320,11 @@ private struct SubmitBuildSheet: View { | ||
| 310 | 320 | .foregroundStyle(.red) |
| 311 | 321 | } |
| 312 | 322 | .foregroundStyle(.red) |
| 323 | .themedRow() | |
| 313 | 324 | } |
| 314 | 325 | } |
| 315 | 326 | } |
| 327 | .themedList() | |
| 316 | 328 | .navigationTitle("Submit Build") |
| 317 | 329 | .navigationBarTitleDisplayMode(.inline) |
| 318 | 330 | .onDisappear { |
Hutch/Views/Home/HomeView.swift +6
| @@ -94,6 +94,7 @@ struct HomeView: View { | ||
| 94 | 94 | ) |
| 95 | 95 | } |
| 96 | 96 | .buttonStyle(.plain) |
| 97 | .themedRow() | |
| 97 | 98 | } |
| 98 | 99 | } |
| 99 | 100 | } |
| @@ -109,6 +110,7 @@ struct HomeView: View { | ||
| 109 | 110 | emphasis: .action |
| 110 | 111 | ) |
| 111 | 112 | } |
| 113 | .themedRow() | |
| 112 | 114 | } |
| 113 | 115 | } |
| 114 | 116 | |
| @@ -126,6 +128,7 @@ struct HomeView: View { | ||
| 126 | 128 | .disabled(isOpeningRecentItem) |
| 127 | 129 | .listRowSeparator(.hidden) |
| 128 | 130 | } |
| 131 | .themedRow() | |
| 129 | 132 | } |
| 130 | 133 | } |
| 131 | 134 | } |
| @@ -143,6 +146,7 @@ struct HomeView: View { | ||
| 143 | 146 | emphasis: .monitoring |
| 144 | 147 | ) |
| 145 | 148 | } |
| 149 | .themedRow() | |
| 146 | 150 | } |
| 147 | 151 | } |
| 148 | 152 | |
| @@ -156,6 +160,7 @@ struct HomeView: View { | ||
| 156 | 160 | } label: { |
| 157 | 161 | HomeCompactMessageRow(text: "Pin projects for quick access", systemImage: "pin") |
| 158 | 162 | } |
| 163 | .themedRow() | |
| 159 | 164 | } else { |
| 160 | 165 | LazyVGrid( |
| 161 | 166 | columns: [ |
| @@ -174,6 +179,7 @@ struct HomeView: View { | ||
| 174 | 179 | } |
| 175 | 180 | } |
| 176 | 181 | .padding(.vertical, 2) |
| 182 | .themedRow() | |
| 177 | 183 | } |
| 178 | 184 | } |
| 179 | 185 | } |
Hutch/Views/Inbox/ThreadDetailView.swift +6
| @@ -123,6 +123,7 @@ struct ThreadDetailView: View { | ||
| 123 | 123 | .foregroundStyle(.secondary) |
| 124 | 124 | } |
| 125 | 125 | .padding(.vertical, 4) |
| 126 | .themedRow() | |
| 126 | 127 | } |
| 127 | 128 | |
| 128 | 129 | Section("Related") { |
| @@ -138,6 +139,7 @@ struct ThreadDetailView: View { | ||
| 138 | 139 | } label: { |
| 139 | 140 | Label(thread.listDisplayName, systemImage: "list.bullet") |
| 140 | 141 | } |
| 142 | .themedRow() | |
| 141 | 143 | |
| 142 | 144 | if let repo = self.thread.repo { |
| 143 | 145 | Button { |
| @@ -157,6 +159,7 @@ struct ThreadDetailView: View { | ||
| 157 | 159 | } |
| 158 | 160 | } |
| 159 | 161 | .disabled(isOpeningRepository) |
| 162 | .themedRow() | |
| 160 | 163 | } |
| 161 | 164 | } |
| 162 | 165 | |
| @@ -165,6 +168,7 @@ struct ThreadDetailView: View { | ||
| 165 | 168 | Text(partialWarning) |
| 166 | 169 | .font(.caption) |
| 167 | 170 | .foregroundStyle(.secondary) |
| 171 | .themedRow() | |
| 168 | 172 | } |
| 169 | 173 | } |
| 170 | 174 | |
| @@ -184,8 +188,10 @@ struct ThreadDetailView: View { | ||
| 184 | 188 | } |
| 185 | 189 | ) |
| 186 | 190 | } |
| 191 | .themedRow() | |
| 187 | 192 | } |
| 188 | 193 | } |
| 194 | .themedList() | |
| 189 | 195 | .listStyle(.plain) |
| 190 | 196 | .toolbar { |
| 191 | 197 | ToolbarItem(placement: .topBarTrailing) { |
Hutch/Views/Lists/MailingListListView.swift +2
| @@ -142,7 +142,9 @@ struct MailingListListView: View { | ||
| 142 | 142 | .padding(.vertical, 2) |
| 143 | 143 | } |
| 144 | 144 | } |
| 145 | .themedRow() | |
| 145 | 146 | } |
| 147 | .themedList() | |
| 146 | 148 | .listStyle(.plain) |
| 147 | 149 | .searchable( |
| 148 | 150 | text: $vm.searchText, |
Hutch/Views/Lookup/LookupView.swift +5
| @@ -356,6 +356,7 @@ struct LookupView: View { | ||
| 356 | 356 | } |
| 357 | 357 | } |
| 358 | 358 | .pickerStyle(.menu) |
| 359 | .themedRow() | |
| 359 | 360 | |
| 360 | 361 | TextField( |
| 361 | 362 | vm.selectedType.inputLabel, |
| @@ -368,6 +369,7 @@ struct LookupView: View { | ||
| 368 | 369 | .onSubmit { |
| 369 | 370 | Task { await vm.lookup() } |
| 370 | 371 | } |
| 372 | .themedRow() | |
| 371 | 373 | } |
| 372 | 374 | |
| 373 | 375 | Section { |
| @@ -382,6 +384,7 @@ struct LookupView: View { | ||
| 382 | 384 | ProgressView() |
| 383 | 385 | } |
| 384 | 386 | } |
| 387 | .themedRow() | |
| 385 | 388 | } |
| 386 | 389 | |
| 387 | 390 | if !vm.history.isEmpty { |
| @@ -403,11 +406,13 @@ struct LookupView: View { | ||
| 403 | 406 | } |
| 404 | 407 | .disabled(vm.isLooking) |
| 405 | 408 | } |
| 409 | .themedRow() | |
| 406 | 410 | |
| 407 | 411 | Button("Clear History", role: .destructive) { |
| 408 | 412 | vm.clearHistory() |
| 409 | 413 | } |
| 410 | 414 | .disabled(vm.isLooking) |
| 415 | .themedRow() | |
| 411 | 416 | } |
| 412 | 417 | } |
| 413 | 418 | } |
Hutch/Views/Lookup/UserProfileView.swift +23 −1
| @@ -2,6 +2,7 @@ import SwiftUI | ||
| 2 | 2 | |
| 3 | 3 | struct UserProfileView: View { |
| 4 | 4 | @Environment(AppState.self) private var appState |
| 5 | @Environment(\.isAMOLEDTheme) private var isAMOLED | |
| 5 | 6 | @AppStorage(AppStorageKeys.contributionGraphsEnabled, store: .standard) private var contributionGraphsEnabled = true |
| 6 | 7 | |
| 7 | 8 | let user: User |
| @@ -55,33 +56,41 @@ struct UserProfileView: View { | ||
| 55 | 56 | } |
| 56 | 57 | Spacer() |
| 57 | 58 | } |
| 58 | .listRowBackground(Color.clear) | |
| 59 | .listRowBackground(isAMOLED ? Color.black : Color.clear) | |
| 59 | 60 | } |
| 60 | 61 | } |
| 61 | 62 | |
| 62 | 63 | Section { |
| 63 | 64 | LabeledContent("Username", value: user.username) |
| 65 | .themedRow() | |
| 64 | 66 | LabeledContent("Canonical Name", value: user.canonicalName) |
| 67 | .themedRow() | |
| 65 | 68 | if let userType = user.userType { |
| 66 | 69 | LabeledContent("User Type", value: userType) |
| 70 | .themedRow() | |
| 67 | 71 | } |
| 68 | 72 | if let pronouns = user.pronouns { |
| 69 | 73 | LabeledContent("Pronouns", value: pronouns) |
| 74 | .themedRow() | |
| 70 | 75 | } |
| 71 | 76 | if let suspensionNotice = user.suspensionNotice { |
| 72 | 77 | LabeledContent("Suspension Notice", value: suspensionNotice) |
| 78 | .themedRow() | |
| 73 | 79 | } |
| 74 | 80 | } |
| 75 | 81 | |
| 76 | 82 | Section { |
| 77 | 83 | LabeledContent("Email", value: user.email) |
| 84 | .themedRow() | |
| 78 | 85 | if let urlString = user.url, let url = URL(string: urlString) { |
| 79 | 86 | LabeledContent("URL") { |
| 80 | 87 | Link(urlString, destination: url) |
| 81 | 88 | } |
| 89 | .themedRow() | |
| 82 | 90 | } |
| 83 | 91 | if let location = user.location { |
| 84 | 92 | LabeledContent("Location", value: location) |
| 93 | .themedRow() | |
| 85 | 94 | } |
| 86 | 95 | } |
| 87 | 96 | |
| @@ -91,6 +100,7 @@ struct UserProfileView: View { | ||
| 91 | 100 | .frame(maxWidth: .infinity, alignment: .leading) |
| 92 | 101 | .tint(.accentColor) |
| 93 | 102 | .textSelection(.enabled) |
| 103 | .themedRow() | |
| 94 | 104 | } |
| 95 | 105 | } |
| 96 | 106 | |
| @@ -98,9 +108,11 @@ struct UserProfileView: View { | ||
| 98 | 108 | Section { |
| 99 | 109 | if let created = user.created { |
| 100 | 110 | LabeledContent("Joined", value: formattedTimestamp(created)) |
| 111 | .themedRow() | |
| 101 | 112 | } |
| 102 | 113 | if let updated = user.updated { |
| 103 | 114 | LabeledContent("Updated", value: formattedTimestamp(updated)) |
| 115 | .themedRow() | |
| 104 | 116 | } |
| 105 | 117 | } |
| 106 | 118 | } |
| @@ -118,15 +130,18 @@ struct UserProfileView: View { | ||
| 118 | 130 | error: viewModel.contributionsError ?? viewModel.contributionStatusText, |
| 119 | 131 | isIndexedButEmpty: viewModel.isContributionActivityIndexedButEmpty |
| 120 | 132 | ) |
| 133 | .themedRow() | |
| 121 | 134 | } |
| 122 | 135 | } |
| 123 | 136 | |
| 124 | 137 | Section { |
| 125 | 138 | if viewModel.isLoadingRepositories && viewModel.repositories.isEmpty { |
| 126 | 139 | ProgressView() |
| 140 | .themedRow() | |
| 127 | 141 | } else if viewModel.repositories.isEmpty { |
| 128 | 142 | Text("No public repositories.") |
| 129 | 143 | .foregroundStyle(.secondary) |
| 144 | .themedRow() | |
| 130 | 145 | } else { |
| 131 | 146 | ForEach(viewModel.repositories.prefix(4)) { repo in |
| 132 | 147 | NavigationLink { |
| @@ -137,10 +152,12 @@ struct UserProfileView: View { | ||
| 137 | 152 | RepositoryRowView(repository: repo, buildStatus: .none) |
| 138 | 153 | } |
| 139 | 154 | } |
| 155 | .themedRow() | |
| 140 | 156 | if viewModel.repositories.count > 4 { |
| 141 | 157 | NavigationLink("See All") { |
| 142 | 158 | UserRepositoriesView(viewModel: viewModel) |
| 143 | 159 | } |
| 160 | .themedRow() | |
| 144 | 161 | } |
| 145 | 162 | } |
| 146 | 163 | } header: { |
| @@ -150,9 +167,11 @@ struct UserProfileView: View { | ||
| 150 | 167 | Section { |
| 151 | 168 | if viewModel.isLoadingTrackers && viewModel.trackers.isEmpty { |
| 152 | 169 | ProgressView() |
| 170 | .themedRow() | |
| 153 | 171 | } else if viewModel.trackers.isEmpty { |
| 154 | 172 | Text("No public trackers.") |
| 155 | 173 | .foregroundStyle(.secondary) |
| 174 | .themedRow() | |
| 156 | 175 | } else { |
| 157 | 176 | ForEach(viewModel.trackers.prefix(4)) { tracker in |
| 158 | 177 | NavigationLink { |
| @@ -161,10 +180,12 @@ struct UserProfileView: View { | ||
| 161 | 180 | UserProfileTrackerRowView(tracker: tracker) |
| 162 | 181 | } |
| 163 | 182 | } |
| 183 | .themedRow() | |
| 164 | 184 | if viewModel.trackers.count > 4 { |
| 165 | 185 | NavigationLink("See All") { |
| 166 | 186 | UserTrackersView(viewModel: viewModel) |
| 167 | 187 | } |
| 188 | .themedRow() | |
| 168 | 189 | } |
| 169 | 190 | } |
| 170 | 191 | } header: { |
| @@ -172,6 +193,7 @@ struct UserProfileView: View { | ||
| 172 | 193 | } |
| 173 | 194 | } |
| 174 | 195 | } |
| 196 | .themedList() | |
| 175 | 197 | .listStyle(.insetGrouped) |
| 176 | 198 | .navigationTitle(user.canonicalName) |
| 177 | 199 | .navigationBarTitleDisplayMode(.inline) |
Hutch/Views/Lookup/UserRepositoriesView.swift +2
| @@ -14,7 +14,9 @@ struct UserRepositoriesView: View { | ||
| 14 | 14 | RepositoryRowView(repository: repo, buildStatus: .none) |
| 15 | 15 | } |
| 16 | 16 | } |
| 17 | .themedRow() | |
| 17 | 18 | } |
| 19 | .themedList() | |
| 18 | 20 | .listStyle(.plain) |
| 19 | 21 | .navigationTitle("Repositories") |
| 20 | 22 | .navigationBarTitleDisplayMode(.inline) |
Hutch/Views/Lookup/UserTrackersView.swift +2
| @@ -12,7 +12,9 @@ struct UserTrackersView: View { | ||
| 12 | 12 | UserProfileTrackerRowView(tracker: tracker) |
| 13 | 13 | } |
| 14 | 14 | } |
| 15 | .themedRow() | |
| 15 | 16 | } |
| 17 | .themedList() | |
| 16 | 18 | .listStyle(.plain) |
| 17 | 19 | .navigationTitle("Trackers") |
| 18 | 20 | .navigationBarTitleDisplayMode(.inline) |
Hutch/Views/More/AccountSwitcherView.swift +3
| @@ -48,6 +48,7 @@ struct AccountSwitcherView: View { | ||
| 48 | 48 | pendingRemoval = appState.accounts[index] |
| 49 | 49 | } |
| 50 | 50 | } |
| 51 | .themedRow() | |
| 51 | 52 | } |
| 52 | 53 | |
| 53 | 54 | Section { |
| @@ -57,8 +58,10 @@ struct AccountSwitcherView: View { | ||
| 57 | 58 | Label("Add Account", systemImage: "plus.circle") |
| 58 | 59 | } |
| 59 | 60 | .disabled(isSwitching) |
| 61 | .themedRow() | |
| 60 | 62 | } |
| 61 | 63 | } |
| 64 | .themedList() | |
| 62 | 65 | .navigationTitle("Accounts") |
| 63 | 66 | .navigationBarTitleDisplayMode(.inline) |
| 64 | 67 | .toolbar { |
Hutch/Views/More/AddAccountView.swift +3
| @@ -15,6 +15,7 @@ struct AddAccountView: View { | ||
| 15 | 15 | SecureField("Personal Access Token", text: $token) |
| 16 | 16 | .autocorrectionDisabled() |
| 17 | 17 | .textInputAutocapitalization(.never) |
| 18 | .themedRow() | |
| 18 | 19 | } footer: { |
| 19 | 20 | Text("Generate a token at meta.sr.ht → OAuth2 clients.") |
| 20 | 21 | } |
| @@ -23,9 +24,11 @@ struct AddAccountView: View { | ||
| 23 | 24 | Section { |
| 24 | 25 | Text(errorMessage) |
| 25 | 26 | .foregroundStyle(.red) |
| 27 | .themedRow() | |
| 26 | 28 | } |
| 27 | 29 | } |
| 28 | 30 | } |
| 31 | .themedList() | |
| 29 | 32 | .navigationTitle("Add Account") |
| 30 | 33 | .navigationBarTitleDisplayMode(.inline) |
| 31 | 34 | .toolbar { |
Hutch/Views/More/ManPageBrowserView.swift +2
| @@ -25,8 +25,10 @@ struct ManPageBrowserView: View { | ||
| 25 | 25 | Text(doc.title) |
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | .themedRow() | |
| 28 | 29 | } |
| 29 | 30 | } |
| 31 | .themedList() | |
| 30 | 32 | .navigationTitle("Man Pages") |
| 31 | 33 | .navigationBarTitleDisplayMode(.inline) |
| 32 | 34 | } |
Hutch/Views/More/MoreView.swift +9
| @@ -16,24 +16,29 @@ struct MoreView: View { | ||
| 16 | 16 | NavigationLink(value: MoreRoute.lookup) { |
| 17 | 17 | Label("Look Up", systemImage: "magnifyingglass") |
| 18 | 18 | } |
| 19 | .themedRow() | |
| 19 | 20 | } |
| 20 | 21 | |
| 21 | 22 | Section("Other Services") { |
| 22 | 23 | NavigationLink(value: MoreRoute.projects) { |
| 23 | 24 | Label("Projects", systemImage: "square.stack.3d.up") |
| 24 | 25 | } |
| 26 | .themedRow() | |
| 25 | 27 | |
| 26 | 28 | NavigationLink(value: MoreRoute.lists) { |
| 27 | 29 | Label("Mailing Lists", systemImage: "list.bullet.rectangle") |
| 28 | 30 | } |
| 31 | .themedRow() | |
| 29 | 32 | |
| 30 | 33 | NavigationLink(value: MoreRoute.manPageBrowser) { |
| 31 | 34 | Label("Man Pages", systemImage: "book") |
| 32 | 35 | } |
| 36 | .themedRow() | |
| 33 | 37 | |
| 34 | 38 | NavigationLink(value: MoreRoute.pastes) { |
| 35 | 39 | Label("Pastes", systemImage: "doc.on.clipboard") |
| 36 | 40 | } |
| 41 | .themedRow() | |
| 37 | 42 | |
| 38 | 43 | NavigationLink(value: MoreRoute.systemStatus) { |
| 39 | 44 | SystemStatusSummaryRow( |
| @@ -43,16 +48,19 @@ struct MoreView: View { | ||
| 43 | 48 | isShowingStaleData: viewModel?.isShowingStaleSystemStatus ?? false |
| 44 | 49 | ) |
| 45 | 50 | } |
| 51 | .themedRow() | |
| 46 | 52 | } |
| 47 | 53 | |
| 48 | 54 | Section("Meta") { |
| 49 | 55 | NavigationLink(value: MoreRoute.profile) { |
| 50 | 56 | Label("Profile", systemImage: "person.text.rectangle") |
| 51 | 57 | } |
| 58 | .themedRow() | |
| 52 | 59 | |
| 53 | 60 | NavigationLink(value: MoreRoute.settings) { |
| 54 | 61 | Label("Settings", systemImage: "gear") |
| 55 | 62 | } |
| 63 | .themedRow() | |
| 56 | 64 | } |
| 57 | 65 | |
| 58 | 66 | Section { |
| @@ -61,6 +69,7 @@ struct MoreView: View { | ||
| 61 | 69 | Label(item.title, systemImage: "safari") |
| 62 | 70 | } |
| 63 | 71 | } |
| 72 | .themedRow() | |
| 64 | 73 | } header: { |
| 65 | 74 | Text("External Links") |
| 66 | 75 | } footer: { |
Hutch/Views/More/ProfileView.swift +29 −2
| @@ -79,6 +79,7 @@ struct ProfileView: View { | ||
| 79 | 79 | error: contributionViewModel.contributionsError ?? contributionViewModel.contributionStatusText, |
| 80 | 80 | isIndexedButEmpty: contributionViewModel.isContributionActivityIndexedButEmpty |
| 81 | 81 | ) |
| 82 | .themedRow() | |
| 82 | 83 | } |
| 83 | 84 | } |
| 84 | 85 | |
| @@ -185,6 +186,7 @@ struct ProfileView: View { | ||
| 185 | 186 | } |
| 186 | 187 | } |
| 187 | 188 | .padding(.vertical, 4) |
| 189 | .themedRow() | |
| 188 | 190 | |
| 189 | 191 | if let bio = profile.bio, !bio.isEmpty { |
| 190 | 192 | VStack(alignment: .leading, spacing: 2) { |
| @@ -193,36 +195,44 @@ struct ProfileView: View { | ||
| 193 | 195 | .foregroundStyle(.secondary) |
| 194 | 196 | ProfileBioView(markdown: bio) |
| 195 | 197 | } |
| 198 | .themedRow() | |
| 196 | 199 | } |
| 197 | 200 | |
| 198 | 201 | if let location = profile.location, !location.isEmpty { |
| 199 | 202 | LabeledContent("Location", value: location) |
| 203 | .themedRow() | |
| 200 | 204 | } |
| 201 | 205 | |
| 202 | 206 | if let url = profile.url, !url.isEmpty { |
| 203 | 207 | LabeledContent("URL", value: url) |
| 208 | .themedRow() | |
| 204 | 209 | } |
| 205 | 210 | |
| 206 | 211 | if let status = profile.paymentStatus { |
| 207 | 212 | LabeledContent("Payment", value: status.capitalized) |
| 213 | .themedRow() | |
| 208 | 214 | } |
| 209 | 215 | |
| 210 | 216 | if let sub = profile.subscription { |
| 211 | 217 | if let status = sub.status { |
| 212 | 218 | LabeledContent("Subscription", value: status.capitalized) |
| 219 | .themedRow() | |
| 213 | 220 | } |
| 214 | 221 | if let interval = sub.interval { |
| 215 | 222 | LabeledContent("Interval", value: interval.capitalized) |
| 223 | .themedRow() | |
| 216 | 224 | } |
| 217 | 225 | } |
| 218 | 226 | |
| 219 | 227 | Button("Edit Profile") { |
| 220 | 228 | viewModel.isEditingProfile = true |
| 221 | 229 | } |
| 230 | .themedRow() | |
| 222 | 231 | |
| 223 | 232 | SRHTShareButton(url: SRHTWebURL.profile(canonicalName: profile.canonicalName), target: .profile) { |
| 224 | 233 | SwiftUI.Label("Share Profile", systemImage: "square.and.arrow.up") |
| 225 | 234 | } |
| 235 | .themedRow() | |
| 226 | 236 | } |
| 227 | 237 | } |
| 228 | 238 | |
| @@ -262,11 +272,13 @@ struct ProfileView: View { | ||
| 262 | 272 | } |
| 263 | 273 | } |
| 264 | 274 | } |
| 275 | .themedRow() | |
| 265 | 276 | |
| 266 | 277 | if viewModel.isAddingSSHKey { |
| 267 | 278 | TextField("Paste SSH public key", text: $vm.newSSHKey, axis: .vertical) |
| 268 | 279 | .font(.caption.monospaced()) |
| 269 | 280 | .lineLimit(3...6) |
| 281 | .themedRow() | |
| 270 | 282 | |
| 271 | 283 | HStack { |
| 272 | 284 | Button("Cancel") { |
| @@ -280,12 +292,14 @@ struct ProfileView: View { | ||
| 280 | 292 | .buttonStyle(.borderedProminent) |
| 281 | 293 | .disabled(viewModel.newSSHKey.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty) |
| 282 | 294 | } |
| 295 | .themedRow() | |
| 283 | 296 | } else { |
| 284 | 297 | Button { |
| 285 | 298 | viewModel.isAddingSSHKey = true |
| 286 | 299 | } label: { |
| 287 | 300 | SwiftUI.Label("Add SSH Key", systemImage: "key") |
| 288 | 301 | } |
| 302 | .themedRow() | |
| 289 | 303 | } |
| 290 | 304 | } header: { |
| 291 | 305 | Text("SSH Keys") |
| @@ -316,11 +330,13 @@ struct ProfileView: View { | ||
| 316 | 330 | } |
| 317 | 331 | } |
| 318 | 332 | } |
| 333 | .themedRow() | |
| 319 | 334 | |
| 320 | 335 | if viewModel.isAddingPGPKey { |
| 321 | 336 | TextField("Paste PGP public key", text: $vm.newPGPKey, axis: .vertical) |
| 322 | 337 | .font(.caption.monospaced()) |
| 323 | 338 | .lineLimit(3...6) |
| 339 | .themedRow() | |
| 324 | 340 | |
| 325 | 341 | HStack { |
| 326 | 342 | Button("Cancel") { |
| @@ -334,12 +350,14 @@ struct ProfileView: View { | ||
| 334 | 350 | .buttonStyle(.borderedProminent) |
| 335 | 351 | .disabled(viewModel.newPGPKey.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty) |
| 336 | 352 | } |
| 353 | .themedRow() | |
| 337 | 354 | } else { |
| 338 | 355 | Button { |
| 339 | 356 | viewModel.isAddingPGPKey = true |
| 340 | 357 | } label: { |
| 341 | 358 | SwiftUI.Label("Add PGP Key", systemImage: "key.fill") |
| 342 | 359 | } |
| 360 | .themedRow() | |
| 343 | 361 | } |
| 344 | 362 | } header: { |
| 345 | 363 | Text("PGP Keys") |
| @@ -357,10 +375,12 @@ struct ProfileView: View { | ||
| 357 | 375 | ProgressView() |
| 358 | 376 | Spacer() |
| 359 | 377 | } |
| 378 | .themedRow() | |
| 360 | 379 | } else if viewModel.personalAccessTokens.isEmpty { |
| 361 | 380 | Button("Load Tokens") { |
| 362 | 381 | Task { await viewModel.loadPersonalAccessTokens() } |
| 363 | 382 | } |
| 383 | .themedRow() | |
| 364 | 384 | } else { |
| 365 | 385 | ForEach(viewModel.personalAccessTokens) { token in |
| 366 | 386 | VStack(alignment: .leading, spacing: 4) { |
| @@ -390,6 +410,7 @@ struct ProfileView: View { | ||
| 390 | 410 | } |
| 391 | 411 | } |
| 392 | 412 | } |
| 413 | .themedRow() | |
| 393 | 414 | } |
| 394 | 415 | } header: { |
| 395 | 416 | Text("Personal Access Tokens") |
| @@ -426,6 +447,7 @@ private struct EditProfileSheet: View { | ||
| 426 | 447 | let profile: UserProfile |
| 427 | 448 | let viewModel: SettingsViewModel |
| 428 | 449 | |
| 450 | @Environment(\.isAMOLEDTheme) private var isAMOLED | |
| 429 | 451 | @State private var email: String |
| 430 | 452 | @State private var url: String |
| 431 | 453 | @State private var location: String |
| @@ -492,7 +514,7 @@ private struct EditProfileSheet: View { | ||
| 492 | 514 | } |
| 493 | 515 | Spacer() |
| 494 | 516 | } |
| 495 | .listRowBackground(Color.clear) | |
| 517 | .listRowBackground(isAMOLED ? Color.black : Color.clear) | |
| 496 | 518 | |
| 497 | 519 | if profile.avatar != nil || avatarPreview != nil { |
| 498 | 520 | HStack { |
| @@ -506,7 +528,7 @@ private struct EditProfileSheet: View { | ||
| 506 | 528 | .disabled(viewModel.isUploadingAvatar) |
| 507 | 529 | Spacer() |
| 508 | 530 | } |
| 509 | .listRowBackground(Color.clear) | |
| 531 | .listRowBackground(isAMOLED ? Color.black : Color.clear) | |
| 510 | 532 | .listRowSeparator(.hidden) |
| 511 | 533 | } |
| 512 | 534 | } |
| @@ -522,6 +544,7 @@ private struct EditProfileSheet: View { | ||
| 522 | 544 | .autocorrectionDisabled() |
| 523 | 545 | .textInputAutocapitalization(.never) |
| 524 | 546 | } |
| 547 | .themedRow() | |
| 525 | 548 | |
| 526 | 549 | VStack(alignment: .leading, spacing: 4) { |
| 527 | 550 | Text("URL") |
| @@ -533,6 +556,7 @@ private struct EditProfileSheet: View { | ||
| 533 | 556 | .autocorrectionDisabled() |
| 534 | 557 | .textInputAutocapitalization(.never) |
| 535 | 558 | } |
| 559 | .themedRow() | |
| 536 | 560 | |
| 537 | 561 | VStack(alignment: .leading, spacing: 4) { |
| 538 | 562 | Text("Location") |
| @@ -540,6 +564,7 @@ private struct EditProfileSheet: View { | ||
| 540 | 564 | .foregroundStyle(.secondary) |
| 541 | 565 | TextField("Enter location", text: $location) |
| 542 | 566 | } |
| 567 | .themedRow() | |
| 543 | 568 | |
| 544 | 569 | VStack(alignment: .leading, spacing: 4) { |
| 545 | 570 | Text("Bio") |
| @@ -548,8 +573,10 @@ private struct EditProfileSheet: View { | ||
| 548 | 573 | TextField("Enter bio", text: $bio, axis: .vertical) |
| 549 | 574 | .lineLimit(3...6) |
| 550 | 575 | } |
| 576 | .themedRow() | |
| 551 | 577 | } |
| 552 | 578 | } |
| 579 | .themedList() | |
| 553 | 580 | .navigationTitle("Edit Profile") |
| 554 | 581 | .navigationBarTitleDisplayMode(.inline) |
| 555 | 582 | .onChange(of: selectedPhoto) { _, newItem in |
Hutch/Views/Pastes/PasteDetailView.swift +8
| @@ -326,13 +326,18 @@ private struct PasteInfoSheet: View { | ||
| 326 | 326 | List { |
| 327 | 327 | Section("Paste") { |
| 328 | 328 | LabeledContent("ID", value: paste.id) |
| 329 | .themedRow() | |
| 329 | 330 | LabeledContent("Owner", value: paste.user.canonicalName) |
| 331 | .themedRow() | |
| 330 | 332 | LabeledContent("Created", value: paste.created.relativeDescription) |
| 333 | .themedRow() | |
| 331 | 334 | LabeledContent("Visibility") { |
| 332 | 335 | VisibilityBadge(visibility: paste.visibility) |
| 333 | 336 | } |
| 337 | .themedRow() | |
| 334 | 338 | if paste.files.count > 1 { |
| 335 | 339 | LabeledContent("Files", value: "\(paste.files.count)") |
| 340 | .themedRow() | |
| 336 | 341 | } |
| 337 | 342 | } |
| 338 | 343 | |
| @@ -340,6 +345,7 @@ private struct PasteInfoSheet: View { | ||
| 340 | 345 | Section("File") { |
| 341 | 346 | if let filename = file.filename, !filename.isEmpty { |
| 342 | 347 | LabeledContent("Filename", value: filename) |
| 348 | .themedRow() | |
| 343 | 349 | } |
| 344 | 350 | LabeledContent("Hash") { |
| 345 | 351 | Text(file.hash) |
| @@ -347,6 +353,7 @@ private struct PasteInfoSheet: View { | ||
| 347 | 353 | .foregroundStyle(.secondary) |
| 348 | 354 | .textSelection(.enabled) |
| 349 | 355 | } |
| 356 | .themedRow() | |
| 350 | 357 | } |
| 351 | 358 | } |
| 352 | 359 | } |
| @@ -407,6 +414,7 @@ private struct PasteVisibilitySheet: View { | ||
| 407 | 414 | } |
| 408 | 415 | .buttonStyle(.plain) |
| 409 | 416 | } |
| 417 | .themedRow() | |
| 410 | 418 | } |
| 411 | 419 | .listStyle(.insetGrouped) |
| 412 | 420 | .navigationTitle("Visibility") |
Hutch/Views/Pastes/PasteListView.swift +8
| @@ -101,6 +101,7 @@ struct PasteListView: View { | ||
| 101 | 101 | await viewModel.loadMoreIfNeeded(currentItem: paste) |
| 102 | 102 | } |
| 103 | 103 | } |
| 104 | .themedRow() | |
| 104 | 105 | |
| 105 | 106 | if viewModel.isLoadingMore { |
| 106 | 107 | HStack { |
| @@ -109,6 +110,7 @@ struct PasteListView: View { | ||
| 109 | 110 | Spacer() |
| 110 | 111 | } |
| 111 | 112 | .listRowSeparator(.hidden) |
| 113 | .themedRow() | |
| 112 | 114 | } |
| 113 | 115 | } |
| 114 | 116 | .themedList() |
| @@ -302,12 +304,14 @@ private struct CreatePasteSheet: View { | ||
| 302 | 304 | files = [PasteUploadDraft()] |
| 303 | 305 | } |
| 304 | 306 | } |
| 307 | .themedRow() | |
| 305 | 308 | |
| 306 | 309 | Button { |
| 307 | 310 | files.append(PasteUploadDraft()) |
| 308 | 311 | } label: { |
| 309 | 312 | Label("Add File", systemImage: "plus") |
| 310 | 313 | } |
| 314 | .themedRow() | |
| 311 | 315 | } |
| 312 | 316 | |
| 313 | 317 | Section("Visibility") { |
| @@ -316,21 +320,25 @@ private struct CreatePasteSheet: View { | ||
| 316 | 320 | Text("Unlisted").tag(Visibility.unlisted) |
| 317 | 321 | Text("Private").tag(Visibility.private) |
| 318 | 322 | } |
| 323 | .themedRow() | |
| 319 | 324 | } |
| 320 | 325 | |
| 321 | 326 | Section { |
| 322 | 327 | Text("Paste contents are uploaded as UTF-8 text files. Hutch can change visibility later, but the API does not support editing file contents after creation.") |
| 323 | 328 | .font(.footnote) |
| 324 | 329 | .foregroundStyle(.secondary) |
| 330 | .themedRow() | |
| 325 | 331 | } |
| 326 | 332 | |
| 327 | 333 | if let error = viewModel.error { |
| 328 | 334 | Section { |
| 329 | 335 | Label(error, systemImage: "exclamationmark.triangle.fill") |
| 330 | 336 | .foregroundStyle(.red) |
| 337 | .themedRow() | |
| 331 | 338 | } |
| 332 | 339 | } |
| 333 | 340 | } |
| 341 | .themedList() | |
| 334 | 342 | .navigationTitle("New Paste") |
| 335 | 343 | .navigationBarTitleDisplayMode(.inline) |
| 336 | 344 | .toolbar { |
Hutch/Views/Projects/ProjectDetailView.swift +6
| @@ -103,6 +103,7 @@ struct ProjectDetailView: View { | ||
| 103 | 103 | } |
| 104 | 104 | } |
| 105 | 105 | .padding(.vertical, 4) |
| 106 | .themedRow() | |
| 106 | 107 | } |
| 107 | 108 | } |
| 108 | 109 | |
| @@ -127,6 +128,7 @@ struct ProjectDetailView: View { | ||
| 127 | 128 | } |
| 128 | 129 | .buttonStyle(.plain) |
| 129 | 130 | } |
| 131 | .themedRow() | |
| 130 | 132 | } |
| 131 | 133 | } |
| 132 | 134 | } |
| @@ -155,6 +157,7 @@ struct ProjectDetailView: View { | ||
| 155 | 157 | } |
| 156 | 158 | .buttonStyle(.plain) |
| 157 | 159 | } |
| 160 | .themedRow() | |
| 158 | 161 | } |
| 159 | 162 | } |
| 160 | 163 | } |
| @@ -183,6 +186,7 @@ struct ProjectDetailView: View { | ||
| 183 | 186 | } |
| 184 | 187 | .buttonStyle(.plain) |
| 185 | 188 | } |
| 189 | .themedRow() | |
| 186 | 190 | } |
| 187 | 191 | } |
| 188 | 192 | } |
| @@ -205,6 +209,7 @@ struct ProjectDetailView: View { | ||
| 205 | 209 | } |
| 206 | 210 | .buttonStyle(.plain) |
| 207 | 211 | } |
| 212 | .themedRow() | |
| 208 | 213 | } |
| 209 | 214 | } |
| 210 | 215 | } |
| @@ -218,6 +223,7 @@ struct ProjectDetailView: View { | ||
| 218 | 223 | systemImage: "square.stack.3d.up.slash", |
| 219 | 224 | description: Text("This project doesn’t currently expose repositories, trackers, mailing lists, or external links.") |
| 220 | 225 | ) |
| 226 | .themedRow() | |
| 221 | 227 | } |
| 222 | 228 | } |
| 223 | 229 | } |
Hutch/Views/Projects/ProjectMailingListView.swift +2
| @@ -332,7 +332,9 @@ struct MailingListDetailView: View { | ||
| 332 | 332 | .tint(thread.isUnread ? .blue : .gray) |
| 333 | 333 | } |
| 334 | 334 | } |
| 335 | .themedRow() | |
| 335 | 336 | } |
| 337 | .themedList() | |
| 336 | 338 | .listStyle(.plain) |
| 337 | 339 | .searchable( |
| 338 | 340 | text: $vm.searchText, |
Hutch/Views/Projects/ProjectsListView.swift +1
| @@ -79,6 +79,7 @@ struct ProjectsListView: View { | ||
| 79 | 79 | .buttonStyle(.plain) |
| 80 | 80 | .alignmentGuide(.listRowSeparatorLeading) { _ in 0 } |
| 81 | 81 | } |
| 82 | .themedRow() | |
| 82 | 83 | } |
| 83 | 84 | .themedList() |
| 84 | 85 | .listStyle(.plain) |
Hutch/Views/Repositories/ArtifactsView.swift +2
| @@ -13,9 +13,11 @@ struct ArtifactsView: View { | ||
| 13 | 13 | openURL(artifact.url) |
| 14 | 14 | } |
| 15 | 15 | } |
| 16 | .themedRow() | |
| 16 | 17 | } |
| 17 | 18 | } |
| 18 | 19 | } |
| 20 | .themedList() | |
| 19 | 21 | .listStyle(.insetGrouped) |
| 20 | 22 | .overlay { |
| 21 | 23 | if viewModel.isLoadingArtifacts, viewModel.referenceArtifacts.isEmpty { |
Hutch/Views/Repositories/CommitLogView.swift +3
| @@ -13,6 +13,7 @@ struct CommitLogView: View { | ||
| 13 | 13 | await viewModel.loadMoreCommitsIfNeeded(currentItem: commit) |
| 14 | 14 | } |
| 15 | 15 | } |
| 16 | .themedRow() | |
| 16 | 17 | |
| 17 | 18 | if viewModel.isLoadingMoreCommits { |
| 18 | 19 | HStack { |
| @@ -21,8 +22,10 @@ struct CommitLogView: View { | ||
| 21 | 22 | Spacer() |
| 22 | 23 | } |
| 23 | 24 | .listRowSeparator(.hidden) |
| 25 | .themedRow() | |
| 24 | 26 | } |
| 25 | 27 | } |
| 28 | .themedList() | |
| 26 | 29 | .listStyle(.plain) |
| 27 | 30 | .overlay { |
| 28 | 31 | if viewModel.isLoadingCommits, viewModel.commits.isEmpty { |
Hutch/Views/Repositories/FileTreeView.swift +6
| @@ -233,7 +233,9 @@ private struct FileTreeContentView: View { | ||
| 233 | 233 | await viewModel.navigateInto(entry: entry) |
| 234 | 234 | } |
| 235 | 235 | } |
| 236 | .themedRow() | |
| 236 | 237 | } |
| 238 | .themedList() | |
| 237 | 239 | .listStyle(.plain) |
| 238 | 240 | .refreshable { |
| 239 | 241 | await viewModel.loadRootTree() |
| @@ -848,6 +850,7 @@ private struct RefPickerSheet: View { | ||
| 848 | 850 | ) |
| 849 | 851 | } |
| 850 | 852 | .buttonStyle(.plain) |
| 853 | .themedRow() | |
| 851 | 854 | } |
| 852 | 855 | |
| 853 | 856 | if !viewModel.branches.isEmpty { |
| @@ -868,6 +871,7 @@ private struct RefPickerSheet: View { | ||
| 868 | 871 | } |
| 869 | 872 | .buttonStyle(.plain) |
| 870 | 873 | } |
| 874 | .themedRow() | |
| 871 | 875 | } |
| 872 | 876 | } |
| 873 | 877 | |
| @@ -889,9 +893,11 @@ private struct RefPickerSheet: View { | ||
| 889 | 893 | } |
| 890 | 894 | .buttonStyle(.plain) |
| 891 | 895 | } |
| 896 | .themedRow() | |
| 892 | 897 | } |
| 893 | 898 | } |
| 894 | 899 | } |
| 900 | .themedList() | |
| 895 | 901 | .listStyle(.insetGrouped) |
| 896 | 902 | .navigationTitle("Select Ref") |
| 897 | 903 | .navigationBarTitleDisplayMode(.inline) |
Hutch/Views/Repositories/HgRepositoryDetailView.swift +12
| @@ -396,7 +396,9 @@ struct HgRepositoryDetailView: View { | ||
| 396 | 396 | .onTapGesture { |
| 397 | 397 | Task { await viewModel.openFile(file) } |
| 398 | 398 | } |
| 399 | .themedRow() | |
| 399 | 400 | } |
| 401 | .themedList() | |
| 400 | 402 | .listStyle(.plain) |
| 401 | 403 | } |
| 402 | 404 | } |
| @@ -454,6 +456,7 @@ struct HgRepositoryDetailView: View { | ||
| 454 | 456 | await viewModel.loadMoreLogIfNeeded(currentItem: revision) |
| 455 | 457 | } |
| 456 | 458 | } |
| 459 | .themedRow() | |
| 457 | 460 | |
| 458 | 461 | if viewModel.isLoadingMoreLog { |
| 459 | 462 | HStack { |
| @@ -462,8 +465,10 @@ struct HgRepositoryDetailView: View { | ||
| 462 | 465 | Spacer() |
| 463 | 466 | } |
| 464 | 467 | .listRowSeparator(.hidden) |
| 468 | .themedRow() | |
| 465 | 469 | } |
| 466 | 470 | } |
| 471 | .themedList() | |
| 467 | 472 | .listStyle(.plain) |
| 468 | 473 | .overlay { |
| 469 | 474 | if viewModel.isLoadingLog, viewModel.log.isEmpty { |
| @@ -498,7 +503,9 @@ struct HgRepositoryDetailView: View { | ||
| 498 | 503 | } else { |
| 499 | 504 | List(revisions) { revision in |
| 500 | 505 | namedRevisionRow(revision) |
| 506 | .themedRow() | |
| 501 | 507 | } |
| 508 | .themedList() | |
| 502 | 509 | .listStyle(.plain) |
| 503 | 510 | } |
| 504 | 511 | } |
| @@ -699,6 +706,7 @@ private struct HgBrowseRefPickerSheet: View { | ||
| 699 | 706 | ) |
| 700 | 707 | } |
| 701 | 708 | .buttonStyle(.plain) |
| 709 | .themedRow() | |
| 702 | 710 | } |
| 703 | 711 | |
| 704 | 712 | if !viewModel.branches.isEmpty { |
| @@ -719,6 +727,7 @@ private struct HgBrowseRefPickerSheet: View { | ||
| 719 | 727 | } |
| 720 | 728 | .buttonStyle(.plain) |
| 721 | 729 | } |
| 730 | .themedRow() | |
| 722 | 731 | } |
| 723 | 732 | } |
| 724 | 733 | |
| @@ -740,6 +749,7 @@ private struct HgBrowseRefPickerSheet: View { | ||
| 740 | 749 | } |
| 741 | 750 | .buttonStyle(.plain) |
| 742 | 751 | } |
| 752 | .themedRow() | |
| 743 | 753 | } |
| 744 | 754 | } |
| 745 | 755 | |
| @@ -761,9 +771,11 @@ private struct HgBrowseRefPickerSheet: View { | ||
| 761 | 771 | } |
| 762 | 772 | .buttonStyle(.plain) |
| 763 | 773 | } |
| 774 | .themedRow() | |
| 764 | 775 | } |
| 765 | 776 | } |
| 766 | 777 | } |
| 778 | .themedList() | |
| 767 | 779 | .listStyle(.insetGrouped) |
| 768 | 780 | .navigationTitle("Select Ref") |
| 769 | 781 | .navigationBarTitleDisplayMode(.inline) |
Hutch/Views/Repositories/HgRepositorySettingsView.swift +19
| @@ -49,6 +49,7 @@ struct HgRepositorySettingsView: View { | ||
| 49 | 49 | histeditSection(viewModel) |
| 50 | 50 | deleteSection(viewModel) |
| 51 | 51 | } |
| 52 | .themedList() | |
| 52 | 53 | .srhtErrorBanner(error: $vm.error) |
| 53 | 54 | .alert( |
| 54 | 55 | "Permanently delete \(repository.owner.canonicalName)/\(repository.name)?", |
| @@ -101,25 +102,30 @@ struct HgRepositorySettingsView: View { | ||
| 101 | 102 | Text("\(repository.owner.canonicalName)/\(repository.name)") |
| 102 | 103 | .font(.body.monospaced()) |
| 103 | 104 | } |
| 105 | .themedRow() | |
| 104 | 106 | |
| 105 | 107 | LabeledContent("Forge") { |
| 106 | 108 | Text(repositoryForgeLabel(repository.service)) |
| 107 | 109 | } |
| 110 | .themedRow() | |
| 108 | 111 | |
| 109 | 112 | LabeledContent("Visibility") { |
| 110 | 113 | Text(repositoryVisibilityLabel(viewModel.editedVisibility)) |
| 111 | 114 | } |
| 115 | .themedRow() | |
| 112 | 116 | } |
| 113 | 117 | |
| 114 | 118 | Section("Repository Details") { |
| 115 | 119 | TextField("Description", text: Bindable(viewModel).editedDescription, axis: .vertical) |
| 116 | 120 | .lineLimit(3...6) |
| 121 | .themedRow() | |
| 117 | 122 | |
| 118 | 123 | Picker("Visibility", selection: Bindable(viewModel).editedVisibility) { |
| 119 | 124 | Text("Public").tag(Visibility.public) |
| 120 | 125 | Text("Unlisted").tag(Visibility.unlisted) |
| 121 | 126 | Text("Private").tag(Visibility.private) |
| 122 | 127 | } |
| 128 | .themedRow() | |
| 123 | 129 | |
| 124 | 130 | Button { |
| 125 | 131 | Task { |
| @@ -135,6 +141,7 @@ struct HgRepositorySettingsView: View { | ||
| 135 | 141 | } |
| 136 | 142 | } |
| 137 | 143 | .disabled(viewModel.isSavingInfo || !viewModel.isInfoDirty) |
| 144 | .themedRow() | |
| 138 | 145 | } |
| 139 | 146 | } |
| 140 | 147 | |
| @@ -147,9 +154,11 @@ struct HgRepositorySettingsView: View { | ||
| 147 | 154 | ProgressView() |
| 148 | 155 | Spacer() |
| 149 | 156 | } |
| 157 | .themedRow() | |
| 150 | 158 | } else if viewModel.acls.isEmpty { |
| 151 | 159 | Text("No access entries yet.") |
| 152 | 160 | .foregroundStyle(.secondary) |
| 161 | .themedRow() | |
| 153 | 162 | } else { |
| 154 | 163 | ForEach(viewModel.acls) { entry in |
| 155 | 164 | HStack { |
| @@ -167,6 +176,7 @@ struct HgRepositorySettingsView: View { | ||
| 167 | 176 | } |
| 168 | 177 | } |
| 169 | 178 | } |
| 179 | .themedRow() | |
| 170 | 180 | } |
| 171 | 181 | |
| 172 | 182 | HStack { |
| @@ -192,9 +202,11 @@ struct HgRepositorySettingsView: View { | ||
| 192 | 202 | } |
| 193 | 203 | .disabled(viewModel.isAddingACL || viewModel.newACLEntity.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty) |
| 194 | 204 | } |
| 205 | .themedRow() | |
| 195 | 206 | Text("Add a SourceHut user and choose read-only or read/write access.") |
| 196 | 207 | .font(.caption) |
| 197 | 208 | .foregroundStyle(.secondary) |
| 209 | .themedRow() | |
| 198 | 210 | } |
| 199 | 211 | } |
| 200 | 212 | |
| @@ -202,9 +214,11 @@ struct HgRepositorySettingsView: View { | ||
| 202 | 214 | private func featuresSection(_ viewModel: HgRepositorySettingsViewModel) -> some View { |
| 203 | 215 | Section("Sensitive Settings") { |
| 204 | 216 | Toggle("Hide this repository from public listings", isOn: Bindable(viewModel).editedNonPublishing) |
| 217 | .themedRow() | |
| 205 | 218 | Text("Changes stay pending until you save this section.") |
| 206 | 219 | .font(.caption) |
| 207 | 220 | .foregroundStyle(.secondary) |
| 221 | .themedRow() | |
| 208 | 222 | |
| 209 | 223 | Button { |
| 210 | 224 | Task { |
| @@ -220,6 +234,7 @@ struct HgRepositorySettingsView: View { | ||
| 220 | 234 | } |
| 221 | 235 | } |
| 222 | 236 | .disabled(viewModel.isSavingInfo || !viewModel.isInfoDirty) |
| 237 | .themedRow() | |
| 223 | 238 | } |
| 224 | 239 | } |
| 225 | 240 | |
| @@ -230,16 +245,19 @@ struct HgRepositorySettingsView: View { | ||
| 230 | 245 | .autocorrectionDisabled() |
| 231 | 246 | .textInputAutocapitalization(.never) |
| 232 | 247 | .disabled(true) |
| 248 | .themedRow() | |
| 233 | 249 | |
| 234 | 250 | Text("Removing revisions is not available through the public hg.sr.ht API, so Hutch can’t do this yet.") |
| 235 | 251 | .font(.caption) |
| 236 | 252 | .foregroundStyle(.secondary) |
| 253 | .themedRow() | |
| 237 | 254 | |
| 238 | 255 | Button("Remove Revision", role: .destructive) { |
| 239 | 256 | // Not implemented: the hg.sr.ht API does not expose a histedit endpoint. |
| 240 | 257 | // This button is disabled until the API supports revision removal. |
| 241 | 258 | } |
| 242 | 259 | .disabled(true) |
| 260 | .themedRow() | |
| 243 | 261 | } |
| 244 | 262 | } |
| 245 | 263 | |
| @@ -258,6 +276,7 @@ struct HgRepositorySettingsView: View { | ||
| 258 | 276 | } |
| 259 | 277 | } |
| 260 | 278 | .disabled(viewModel.isDeleting) |
| 279 | .themedRow() | |
| 261 | 280 | } header: { |
| 262 | 281 | Text("Danger Zone") |
| 263 | 282 | } |
Hutch/Views/Repositories/ReferencesListView.swift +3
| @@ -10,6 +10,7 @@ struct ReferencesListView: View { | ||
| 10 | 10 | ForEach(viewModel.branches, id: \.name) { ref in |
| 11 | 11 | ReferenceRow(reference: ref, prefix: "refs/heads/") |
| 12 | 12 | } |
| 13 | .themedRow() | |
| 13 | 14 | } |
| 14 | 15 | } |
| 15 | 16 | |
| @@ -18,9 +19,11 @@ struct ReferencesListView: View { | ||
| 18 | 19 | ForEach(viewModel.tags, id: \.name) { ref in |
| 19 | 20 | ReferenceRow(reference: ref, prefix: "refs/tags/") |
| 20 | 21 | } |
| 22 | .themedRow() | |
| 21 | 23 | } |
| 22 | 24 | } |
| 23 | 25 | } |
| 26 | .themedList() | |
| 24 | 27 | .listStyle(.insetGrouped) |
| 25 | 28 | .overlay { |
| 26 | 29 | if viewModel.isLoadingRefs, viewModel.branches.isEmpty, viewModel.tags.isEmpty { |
Hutch/Views/Repositories/RepositoryACLView.swift +8 −1
| @@ -6,6 +6,7 @@ struct RepositoryACLView: View { | ||
| 6 | 6 | let showsDoneButton: Bool |
| 7 | 7 | |
| 8 | 8 | @Environment(\.dismiss) private var dismiss |
| 9 | @Environment(\.isAMOLEDTheme) private var isAMOLED | |
| 9 | 10 | @State private var viewModel: RepositoryACLViewModel? |
| 10 | 11 | @State private var pendingDeletion: RepositoryACLEntry? |
| 11 | 12 | @State private var showAddSheet = false |
| @@ -70,7 +71,7 @@ struct RepositoryACLView: View { | ||
| 70 | 71 | Text("Only the repository owner currently has access.") |
| 71 | 72 | } |
| 72 | 73 | .frame(maxWidth: .infinity) |
| 73 | .listRowBackground(Color.clear) | |
| 74 | .listRowBackground(isAMOLED ? Color.black : Color.clear) | |
| 74 | 75 | } else { |
| 75 | 76 | Section { |
| 76 | 77 | ForEach(viewModel.visibleEntries) { entry in |
| @@ -86,9 +87,11 @@ struct RepositoryACLView: View { | ||
| 86 | 87 | } |
| 87 | 88 | ) |
| 88 | 89 | } |
| 90 | .themedRow() | |
| 89 | 91 | } |
| 90 | 92 | } |
| 91 | 93 | } |
| 94 | .themedList() | |
| 92 | 95 | .listStyle(.insetGrouped) |
| 93 | 96 | .refreshable { |
| 94 | 97 | await viewModel.load() |
| @@ -192,11 +195,13 @@ private struct RepositoryACLAddUserView: View { | ||
| 192 | 195 | TextField("Username or ~username", text: $viewModel.addUsername) |
| 193 | 196 | .autocorrectionDisabled() |
| 194 | 197 | .textInputAutocapitalization(.never) |
| 198 | .themedRow() | |
| 195 | 199 | |
| 196 | 200 | if let validation = inlineValidationMessage { |
| 197 | 201 | Text(validation) |
| 198 | 202 | .font(.caption) |
| 199 | 203 | .foregroundStyle(.secondary) |
| 204 | .themedRow() | |
| 200 | 205 | } |
| 201 | 206 | } |
| 202 | 207 | |
| @@ -207,8 +212,10 @@ private struct RepositoryACLAddUserView: View { | ||
| 207 | 212 | } |
| 208 | 213 | } |
| 209 | 214 | .pickerStyle(.segmented) |
| 215 | .themedRow() | |
| 210 | 216 | } |
| 211 | 217 | } |
| 218 | .themedList() | |
| 212 | 219 | .navigationTitle("Add User") |
| 213 | 220 | .navigationBarTitleDisplayMode(.inline) |
| 214 | 221 | .toolbar { |
Hutch/Views/Repositories/RepositoryListView.swift +11
| @@ -78,6 +78,7 @@ struct RepositoryListView: View { | ||
| 78 | 78 | .foregroundStyle(.secondary) |
| 79 | 79 | } |
| 80 | 80 | .listRowSeparator(.hidden) |
| 81 | .themedRow() | |
| 81 | 82 | } |
| 82 | 83 | |
| 83 | 84 | ForEach(viewModel.repositories) { repo in |
| @@ -89,6 +90,7 @@ struct RepositoryListView: View { | ||
| 89 | 90 | } |
| 90 | 91 | .alignmentGuide(.listRowSeparatorLeading) { _ in 0 } |
| 91 | 92 | } |
| 93 | .themedRow() | |
| 92 | 94 | |
| 93 | 95 | if viewModel.isLoadingMore { |
| 94 | 96 | HStack { |
| @@ -97,6 +99,7 @@ struct RepositoryListView: View { | ||
| 97 | 99 | Spacer() |
| 98 | 100 | } |
| 99 | 101 | .listRowSeparator(.hidden) |
| 102 | .themedRow() | |
| 100 | 103 | } |
| 101 | 104 | } |
| 102 | 105 | .themedList() |
| @@ -223,16 +226,20 @@ private struct CreateRepositorySheet: View { | ||
| 223 | 226 | Text(service.displayName).tag(service) |
| 224 | 227 | } |
| 225 | 228 | } |
| 229 | .themedRow() | |
| 226 | 230 | TextField("Repository name", text: $name) |
| 227 | 231 | .textInputAutocapitalization(.never) |
| 228 | 232 | .autocorrectionDisabled() |
| 233 | .themedRow() | |
| 229 | 234 | TextField("Short description (optional)", text: $description, axis: .vertical) |
| 230 | 235 | .lineLimit(2...4) |
| 236 | .themedRow() | |
| 231 | 237 | Picker("Visibility", selection: $visibility) { |
| 232 | 238 | Text("Public").tag(Visibility.public) |
| 233 | 239 | Text("Unlisted").tag(Visibility.unlisted) |
| 234 | 240 | Text("Private").tag(Visibility.private) |
| 235 | 241 | } |
| 242 | .themedRow() | |
| 236 | 243 | } |
| 237 | 244 | |
| 238 | 245 | Section("Import Existing Repository") { |
| @@ -241,16 +248,20 @@ private struct CreateRepositorySheet: View { | ||
| 241 | 248 | .textInputAutocapitalization(.never) |
| 242 | 249 | .autocorrectionDisabled() |
| 243 | 250 | .keyboardType(.URL) |
| 251 | .themedRow() | |
| 244 | 252 | Text("Import an existing Git repository from a remote URL.") |
| 245 | 253 | .font(.footnote) |
| 246 | 254 | .foregroundStyle(.secondary) |
| 255 | .themedRow() | |
| 247 | 256 | } else { |
| 248 | 257 | Text("Importing a Mercurial repository from a remote URL is not available through the public API.") |
| 249 | 258 | .font(.footnote) |
| 250 | 259 | .foregroundStyle(.secondary) |
| 260 | .themedRow() | |
| 251 | 261 | } |
| 252 | 262 | } |
| 253 | 263 | } |
| 264 | .themedList() | |
| 254 | 265 | .navigationTitle(service == .git ? "New Git Repository" : "New Mercurial Repository") |
| 255 | 266 | .navigationBarTitleDisplayMode(.inline) |
| 256 | 267 | .toolbar { |
Hutch/Views/Repositories/RepositorySettingsView.swift +19
| @@ -51,6 +51,7 @@ struct RepositorySettingsView: View { | ||
| 51 | 51 | visibilitySection(viewModel) |
| 52 | 52 | deleteSection(viewModel) |
| 53 | 53 | } |
| 54 | .themedList() | |
| 54 | 55 | .srhtErrorBanner(error: $vm.error) |
| 55 | 56 | .alert( |
| 56 | 57 | visibilityConfirmationTitle(for: viewModel), |
| @@ -97,15 +98,18 @@ struct RepositorySettingsView: View { | ||
| 97 | 98 | Text("\(viewModel.repository.owner.canonicalName)/\(viewModel.repository.name)") |
| 98 | 99 | .font(.body.monospaced()) |
| 99 | 100 | } |
| 101 | .themedRow() | |
| 100 | 102 | |
| 101 | 103 | LabeledContent("Default Branch") { |
| 102 | 104 | Text(viewModel.currentDefaultBranchName) |
| 103 | 105 | .font(.body.monospaced()) |
| 104 | 106 | } |
| 107 | .themedRow() | |
| 105 | 108 | |
| 106 | 109 | LabeledContent("Visibility") { |
| 107 | 110 | Text(repositoryVisibilityLabel(viewModel.repository.visibility)) |
| 108 | 111 | } |
| 112 | .themedRow() | |
| 109 | 113 | } |
| 110 | 114 | } |
| 111 | 115 | |
| @@ -115,22 +119,27 @@ struct RepositorySettingsView: View { | ||
| 115 | 119 | TextField("Repository name", text: Bindable(viewModel).editedName) |
| 116 | 120 | .autocorrectionDisabled() |
| 117 | 121 | .textInputAutocapitalization(.never) |
| 122 | .themedRow() | |
| 118 | 123 | |
| 119 | 124 | TextField("Description", text: Bindable(viewModel).editedDescription, axis: .vertical) |
| 120 | 125 | .lineLimit(2...4) |
| 126 | .themedRow() | |
| 121 | 127 | |
| 122 | 128 | if let metadataValidationMessage = viewModel.metadataValidationMessage { |
| 123 | 129 | Text(metadataValidationMessage) |
| 124 | 130 | .font(.caption) |
| 125 | 131 | .foregroundStyle(.red) |
| 132 | .themedRow() | |
| 126 | 133 | } else if viewModel.normalizedEditedName != viewModel.repository.name { |
| 127 | 134 | Text("Changing the repository name updates the repository URL.") |
| 128 | 135 | .font(.caption) |
| 129 | 136 | .foregroundStyle(.secondary) |
| 137 | .themedRow() | |
| 130 | 138 | } else { |
| 131 | 139 | Text("Name and description stay pending until you save this section.") |
| 132 | 140 | .font(.caption) |
| 133 | 141 | .foregroundStyle(.secondary) |
| 142 | .themedRow() | |
| 134 | 143 | } |
| 135 | 144 | |
| 136 | 145 | Button { |
| @@ -153,6 +162,7 @@ struct RepositorySettingsView: View { | ||
| 153 | 162 | !viewModel.isMetadataDirty || |
| 154 | 163 | viewModel.metadataValidationMessage != nil |
| 155 | 164 | ) |
| 165 | .themedRow() | |
| 156 | 166 | } header: { |
| 157 | 167 | Text("Repository Details") |
| 158 | 168 | } |
| @@ -165,10 +175,12 @@ struct RepositorySettingsView: View { | ||
| 165 | 175 | Text(viewModel.currentDefaultBranchName) |
| 166 | 176 | .font(.body.monospaced()) |
| 167 | 177 | } |
| 178 | .themedRow() | |
| 168 | 179 | |
| 169 | 180 | if viewModel.branches.isEmpty { |
| 170 | 181 | Text("This repository doesn't have any branches yet.") |
| 171 | 182 | .foregroundStyle(.secondary) |
| 183 | .themedRow() | |
| 172 | 184 | } else { |
| 173 | 185 | Picker("Branch", selection: Bindable(viewModel).editedHead) { |
| 174 | 186 | ForEach(viewModel.availableBranchNames, id: \.self) { branch in |
| @@ -177,10 +189,12 @@ struct RepositorySettingsView: View { | ||
| 177 | 189 | .tag(branch) |
| 178 | 190 | } |
| 179 | 191 | } |
| 192 | .themedRow() | |
| 180 | 193 | |
| 181 | 194 | Text("Changes stay pending until you set the new default branch.") |
| 182 | 195 | .font(.caption) |
| 183 | 196 | .foregroundStyle(.secondary) |
| 197 | .themedRow() | |
| 184 | 198 | |
| 185 | 199 | Button { |
| 186 | 200 | Task { |
| @@ -202,6 +216,7 @@ struct RepositorySettingsView: View { | ||
| 202 | 216 | !viewModel.isDefaultBranchDirty || |
| 203 | 217 | viewModel.defaultBranchValidationMessage != nil |
| 204 | 218 | ) |
| 219 | .themedRow() | |
| 205 | 220 | } |
| 206 | 221 | } header: { |
| 207 | 222 | Text("Default Branch") |
| @@ -216,10 +231,12 @@ struct RepositorySettingsView: View { | ||
| 216 | 231 | Text("Unlisted").tag(Visibility.unlisted) |
| 217 | 232 | Text("Private").tag(Visibility.private) |
| 218 | 233 | } |
| 234 | .themedRow() | |
| 219 | 235 | |
| 220 | 236 | Text("Visibility changes apply immediately after you confirm them.") |
| 221 | 237 | .font(.caption) |
| 222 | 238 | .foregroundStyle(.secondary) |
| 239 | .themedRow() | |
| 223 | 240 | |
| 224 | 241 | Button { |
| 225 | 242 | showVisibilityConfirmation = true |
| @@ -233,6 +250,7 @@ struct RepositorySettingsView: View { | ||
| 233 | 250 | } |
| 234 | 251 | } |
| 235 | 252 | .disabled(viewModel.isMutating || !viewModel.isVisibilityDirty) |
| 253 | .themedRow() | |
| 236 | 254 | } header: { |
| 237 | 255 | Text("Sensitive Settings") |
| 238 | 256 | } |
| @@ -253,6 +271,7 @@ struct RepositorySettingsView: View { | ||
| 253 | 271 | } |
| 254 | 272 | } |
| 255 | 273 | .disabled(viewModel.isMutating) |
| 274 | .themedRow() | |
| 256 | 275 | } header: { |
| 257 | 276 | Text("Danger Zone") |
| 258 | 277 | } |
Hutch/Views/Settings/SettingsView.swift +23
| @@ -60,11 +60,13 @@ struct SettingsView: View { | ||
| 60 | 60 | Text(theme.label).tag(theme) |
| 61 | 61 | } |
| 62 | 62 | } |
| 63 | .themedRow() | |
| 63 | 64 | Picker("Density", selection: $displayDensity) { |
| 64 | 65 | ForEach(DisplayDensity.allCases) { density in |
| 65 | 66 | Text(density.label).tag(density) |
| 66 | 67 | } |
| 67 | 68 | } |
| 69 | .themedRow() | |
| 68 | 70 | } header: { |
| 69 | 71 | Text("Appearance") |
| 70 | 72 | } footer: { |
| @@ -76,10 +78,12 @@ struct SettingsView: View { | ||
| 76 | 78 | private func behaviorSection() -> some View { |
| 77 | 79 | Section { |
| 78 | 80 | Toggle("Swipe actions", isOn: $swipeActionsEnabled) |
| 81 | .themedRow() | |
| 79 | 82 | Toggle("Contribution graphs", isOn: $contributionGraphsEnabled) |
| 80 | 83 | .onChange(of: contributionGraphsEnabled) { _, newValue in |
| 81 | 84 | ContributionWidgetContextStore.setEnabled(newValue) |
| 82 | 85 | } |
| 86 | .themedRow() | |
| 83 | 87 | } header: { |
| 84 | 88 | Text("Behavior") |
| 85 | 89 | } footer: { |
| @@ -101,12 +105,14 @@ struct SettingsView: View { | ||
| 101 | 105 | } |
| 102 | 106 | } |
| 103 | 107 | .alignmentGuide(.listRowSeparatorLeading) { _ in 0 } |
| 108 | .themedRow() | |
| 104 | 109 | |
| 105 | 110 | Button { |
| 106 | 111 | showAccountSwitcher = true |
| 107 | 112 | } label: { |
| 108 | 113 | Label("Manage Accounts", systemImage: "person.2") |
| 109 | 114 | } |
| 115 | .themedRow() | |
| 110 | 116 | |
| 111 | 117 | HStack { |
| 112 | 118 | Image(systemName: "lock.shield") |
| @@ -116,14 +122,17 @@ struct SettingsView: View { | ||
| 116 | 122 | .foregroundStyle(.secondary) |
| 117 | 123 | } |
| 118 | 124 | .alignmentGuide(.listRowSeparatorLeading) { _ in 0 } |
| 125 | .themedRow() | |
| 119 | 126 | |
| 120 | 127 | Button("Reset App Data", role: .destructive) { |
| 121 | 128 | pendingDestructiveAction = .resetAppData |
| 122 | 129 | } |
| 130 | .themedRow() | |
| 123 | 131 | |
| 124 | 132 | Button("Sign Out", role: .destructive) { |
| 125 | 133 | pendingDestructiveAction = .signOut |
| 126 | 134 | } |
| 135 | .themedRow() | |
| 127 | 136 | } header: { |
| 128 | 137 | Text("Authentication") |
| 129 | 138 | } footer: { |
| @@ -139,6 +148,7 @@ struct SettingsView: View { | ||
| 139 | 148 | } label: { |
| 140 | 149 | SwiftUI.Label("About Hutch", systemImage: "info.circle") |
| 141 | 150 | } |
| 151 | .themedRow() | |
| 142 | 152 | } |
| 143 | 153 | } |
| 144 | 154 | } |
| @@ -211,15 +221,18 @@ private struct AboutView: View { | ||
| 211 | 221 | .foregroundStyle(.secondary) |
| 212 | 222 | } |
| 213 | 223 | .padding(.vertical, 4) |
| 224 | .themedRow() | |
| 214 | 225 | |
| 215 | 226 | LabeledContent("Version", value: version) |
| 216 | 227 | .onTapGesture { |
| 217 | 228 | developerRevealCount = min(developerRevealCount + 1, 5) |
| 218 | 229 | } |
| 230 | .themedRow() | |
| 219 | 231 | LabeledContent("Build", value: build) |
| 220 | 232 | .onTapGesture { |
| 221 | 233 | developerRevealCount = min(developerRevealCount + 1, 5) |
| 222 | 234 | } |
| 235 | .themedRow() | |
| 223 | 236 | } footer: { |
| 224 | 237 | Text(developerRevealFooterText) |
| 225 | 238 | } |
| @@ -228,34 +241,41 @@ private struct AboutView: View { | ||
| 228 | 241 | Link(destination: URL(string: "https://sr.ht")!) { |
| 229 | 242 | SwiftUI.Label("SourceHut", systemImage: "link") |
| 230 | 243 | } |
| 244 | .themedRow() | |
| 231 | 245 | Link(destination: URL(string: "https://man.sr.ht")!) { |
| 232 | 246 | SwiftUI.Label("SourceHut Manuals", systemImage: "book") |
| 233 | 247 | } |
| 248 | .themedRow() | |
| 234 | 249 | Link(destination: URL(string: "https://sr.ht/~ccleberg/Hutch")!) { |
| 235 | 250 | SwiftUI.Label("Project Repository", systemImage: "folder") |
| 236 | 251 | } |
| 252 | .themedRow() | |
| 237 | 253 | } |
| 238 | 254 | |
| 239 | 255 | Section("Support") { |
| 240 | 256 | Link(destination: URL(string: "mailto:hello@cleberg.net")!) { |
| 241 | 257 | SwiftUI.Label("Email Support", systemImage: "envelope") |
| 242 | 258 | } |
| 259 | .themedRow() | |
| 243 | 260 | } |
| 244 | 261 | |
| 245 | 262 | Section("Privacy") { |
| 246 | 263 | Text("Hutch uses your SourceHut personal access token to make requests on your behalf. The token is stored locally in the iOS keychain.") |
| 247 | 264 | .font(.subheadline) |
| 248 | 265 | .foregroundStyle(.secondary) |
| 266 | .themedRow() | |
| 249 | 267 | |
| 250 | 268 | Link(destination: URL(string: "https://zerolabs.sh/hutch/privacy-policy/")!) { |
| 251 | 269 | SwiftUI.Label("Privacy Policy", systemImage: "hand.raised") |
| 252 | 270 | } |
| 271 | .themedRow() | |
| 253 | 272 | } |
| 254 | 273 | |
| 255 | 274 | Section("Acknowledgements") { |
| 256 | 275 | Text("Built for SourceHut users who want quick access to repositories, builds, and tickets on iOS.") |
| 257 | 276 | .font(.subheadline) |
| 258 | 277 | .foregroundStyle(.secondary) |
| 278 | .themedRow() | |
| 259 | 279 | } |
| 260 | 280 | |
| 261 | 281 | if developerToolsVisible { |
| @@ -264,18 +284,21 @@ private struct AboutView: View { | ||
| 264 | 284 | get: { appState.isDebugModeEnabled }, |
| 265 | 285 | set: { appState.isDebugModeEnabled = $0 } |
| 266 | 286 | )) |
| 287 | .themedRow() | |
| 267 | 288 | |
| 268 | 289 | NavigationLink { |
| 269 | 290 | HomePrototypeView() |
| 270 | 291 | } label: { |
| 271 | 292 | SwiftUI.Label("Home Prototype", systemImage: "house") |
| 272 | 293 | } |
| 294 | .themedRow() | |
| 273 | 295 | |
| 274 | 296 | NavigationLink { |
| 275 | 297 | WorkPrototypeView() |
| 276 | 298 | } label: { |
| 277 | 299 | SwiftUI.Label("Work Prototype", systemImage: "tray.full") |
| 278 | 300 | } |
| 301 | .themedRow() | |
| 279 | 302 | } header: { |
| 280 | 303 | Text("Developer") |
| 281 | 304 | } footer: { |
Hutch/Views/SystemStatus/SystemStatusView.swift +7
| @@ -36,6 +36,7 @@ struct SystemStatusView: View { | ||
| 36 | 36 | Label(staleDataMessage, systemImage: "clock.arrow.trianglehead.counterclockwise.rotate.90") |
| 37 | 37 | .font(.subheadline) |
| 38 | 38 | .foregroundStyle(.secondary) |
| 39 | .themedRow() | |
| 39 | 40 | } |
| 40 | 41 | } |
| 41 | 42 | |
| @@ -47,6 +48,7 @@ struct SystemStatusView: View { | ||
| 47 | 48 | |
| 48 | 49 | recentIncidentsSection(viewModel.recentIncidents) |
| 49 | 50 | } |
| 51 | .themedList() | |
| 50 | 52 | .listStyle(.insetGrouped) |
| 51 | 53 | .refreshable { |
| 52 | 54 | await viewModel.load(forceRefresh: true) |
| @@ -99,6 +101,7 @@ struct SystemStatusView: View { | ||
| 99 | 101 | .font(.subheadline.weight(.medium)) |
| 100 | 102 | } |
| 101 | 103 | .padding(.vertical, 4) |
| 104 | .themedRow() | |
| 102 | 105 | } |
| 103 | 106 | } |
| 104 | 107 | |
| @@ -119,6 +122,7 @@ struct SystemStatusView: View { | ||
| 119 | 122 | } |
| 120 | 123 | .padding(.vertical, 2) |
| 121 | 124 | } |
| 125 | .themedRow() | |
| 122 | 126 | } |
| 123 | 127 | } |
| 124 | 128 | |
| @@ -129,6 +133,7 @@ struct SystemStatusView: View { | ||
| 129 | 133 | ForEach(incidents) { incident in |
| 130 | 134 | incidentRow(incident) |
| 131 | 135 | } |
| 136 | .themedRow() | |
| 132 | 137 | } |
| 133 | 138 | } |
| 134 | 139 | } |
| @@ -142,10 +147,12 @@ struct SystemStatusView: View { | ||
| 142 | 147 | systemImage: "clock.arrow.trianglehead.counterclockwise.rotate.90", |
| 143 | 148 | description: Text("The status feed didn’t return any recent incidents.") |
| 144 | 149 | ) |
| 150 | .themedRow() | |
| 145 | 151 | } else { |
| 146 | 152 | ForEach(incidents) { incident in |
| 147 | 153 | incidentRow(incident) |
| 148 | 154 | } |
| 155 | .themedRow() | |
| 149 | 156 | } |
| 150 | 157 | } |
| 151 | 158 | } |
Hutch/Views/Tickets/TicketDetailView.swift +13
| @@ -739,8 +739,10 @@ private struct ResolveSheet: View { | ||
| 739 | 739 | } |
| 740 | 740 | .pickerStyle(.inline) |
| 741 | 741 | .labelsHidden() |
| 742 | .themedRow() | |
| 742 | 743 | } |
| 743 | 744 | } |
| 745 | .themedList() | |
| 744 | 746 | .navigationTitle("Resolve Ticket") |
| 745 | 747 | .navigationBarTitleDisplayMode(.inline) |
| 746 | 748 | .toolbar { |
| @@ -801,6 +803,7 @@ private struct AssignSheet: View { | ||
| 801 | 803 | .buttonStyle(.plain) |
| 802 | 804 | } |
| 803 | 805 | } |
| 806 | .themedRow() | |
| 804 | 807 | } |
| 805 | 808 | } |
| 806 | 809 | |
| @@ -809,6 +812,7 @@ private struct AssignSheet: View { | ||
| 809 | 812 | .textContentType(.username) |
| 810 | 813 | .autocorrectionDisabled() |
| 811 | 814 | .textInputAutocapitalization(.never) |
| 815 | .themedRow() | |
| 812 | 816 | |
| 813 | 817 | Button("Add Assignee") { |
| 814 | 818 | let name = username.trimmingCharacters(in: .whitespacesAndNewlines) |
| @@ -822,8 +826,10 @@ private struct AssignSheet: View { | ||
| 822 | 826 | username.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty |
| 823 | 827 | || viewModel.isPerformingAction |
| 824 | 828 | ) |
| 829 | .themedRow() | |
| 825 | 830 | } |
| 826 | 831 | } |
| 832 | .themedList() | |
| 827 | 833 | .navigationTitle("Assignees") |
| 828 | 834 | .navigationBarTitleDisplayMode(.inline) |
| 829 | 835 | .toolbar { |
| @@ -877,7 +883,9 @@ private struct LabelsSheet: View { | ||
| 877 | 883 | } |
| 878 | 884 | } |
| 879 | 885 | } |
| 886 | .themedRow() | |
| 880 | 887 | } |
| 888 | .themedList() | |
| 881 | 889 | } |
| 882 | 890 | } |
| 883 | 891 | .navigationTitle("Labels") |
| @@ -917,11 +925,14 @@ private struct CreateLabelSheet: View { | ||
| 917 | 925 | Section("Label Details") { |
| 918 | 926 | TextField("Label name", text: $labelName) |
| 919 | 927 | .autocorrectionDisabled() |
| 928 | .themedRow() | |
| 920 | 929 | } |
| 921 | 930 | |
| 922 | 931 | Section("Colors") { |
| 923 | 932 | ColorPicker("Background color", selection: $backgroundColor, supportsOpacity: false) |
| 933 | .themedRow() | |
| 924 | 934 | ColorPicker("Text color", selection: $foregroundColor, supportsOpacity: false) |
| 935 | .themedRow() | |
| 925 | 936 | } |
| 926 | 937 | |
| 927 | 938 | Section("Preview") { |
| @@ -936,8 +947,10 @@ private struct CreateLabelSheet: View { | ||
| 936 | 947 | .clipShape(Capsule()) |
| 937 | 948 | Spacer() |
| 938 | 949 | } |
| 950 | .themedRow() | |
| 939 | 951 | } |
| 940 | 952 | } |
| 953 | .themedList() | |
| 941 | 954 | .navigationTitle("New Label") |
| 942 | 955 | .navigationBarTitleDisplayMode(.inline) |
| 943 | 956 | .toolbar { |
Hutch/Views/Tickets/TicketListView.swift +22 −1
| @@ -6,6 +6,7 @@ struct TicketListView: View { | ||
| 6 | 6 | |
| 7 | 7 | @AppStorage(AppStorageKeys.swipeActionsEnabled, store: .standard) private var swipeActionsEnabled = true |
| 8 | 8 | @Environment(AppState.self) private var appState |
| 9 | @Environment(\.isAMOLEDTheme) private var isAMOLED | |
| 9 | 10 | @Environment(\.dismiss) private var dismiss |
| 10 | 11 | @Environment(\.openURL) private var openURL |
| 11 | 12 | @State private var tracker: TrackerSummary |
| @@ -277,7 +278,7 @@ struct TicketListView: View { | ||
| 277 | 278 | vm.deleteSavedFilter(savedFilter) |
| 278 | 279 | } |
| 279 | 280 | .listRowInsets(EdgeInsets()) |
| 280 | .listRowBackground(Color.clear) | |
| 281 | .listRowBackground(isAMOLED ? Color.black : Color.clear) | |
| 281 | 282 | .listRowSeparator(.hidden) |
| 282 | 283 | |
| 283 | 284 | ForEach(viewModel.filteredTickets) { ticket in |
| @@ -344,6 +345,7 @@ struct TicketListView: View { | ||
| 344 | 345 | await viewModel.loadMoreIfNeeded(currentItem: ticket) |
| 345 | 346 | } |
| 346 | 347 | } |
| 348 | .themedRow() | |
| 347 | 349 | |
| 348 | 350 | if viewModel.isLoadingMore { |
| 349 | 351 | HStack { |
| @@ -352,9 +354,11 @@ struct TicketListView: View { | ||
| 352 | 354 | Spacer() |
| 353 | 355 | } |
| 354 | 356 | .listRowSeparator(.hidden) |
| 357 | .themedRow() | |
| 355 | 358 | } |
| 356 | 359 | } |
| 357 | 360 | } |
| 361 | .themedList() | |
| 358 | 362 | .listStyle(.plain) |
| 359 | 363 | .listSectionSpacing(.compact) |
| 360 | 364 | .searchable( |
| @@ -636,10 +640,13 @@ private struct CreateTicketSheet: View { | ||
| 636 | 640 | Form { |
| 637 | 641 | Section("Ticket Details") { |
| 638 | 642 | TextField("Title", text: $subject) |
| 643 | .themedRow() | |
| 639 | 644 | TextField("Description (optional)", text: $descriptionText, axis: .vertical) |
| 640 | 645 | .lineLimit(6...12) |
| 646 | .themedRow() | |
| 641 | 647 | } |
| 642 | 648 | } |
| 649 | .themedList() | |
| 643 | 650 | .navigationTitle("New Ticket") |
| 644 | 651 | .navigationBarTitleDisplayMode(.inline) |
| 645 | 652 | .toolbar { |
| @@ -705,7 +712,9 @@ private struct TicketLabelsSheet: View { | ||
| 705 | 712 | } |
| 706 | 713 | } |
| 707 | 714 | } |
| 715 | .themedRow() | |
| 708 | 716 | } |
| 717 | .themedList() | |
| 709 | 718 | } |
| 710 | 719 | } else { |
| 711 | 720 | ContentUnavailableView( |
| @@ -921,6 +930,7 @@ private struct TicketFilterLabelsSheet: View { | ||
| 921 | 930 | } |
| 922 | 931 | } |
| 923 | 932 | .padding(.vertical, 4) |
| 933 | .themedRow() | |
| 924 | 934 | } |
| 925 | 935 | } |
| 926 | 936 | |
| @@ -940,8 +950,10 @@ private struct TicketFilterLabelsSheet: View { | ||
| 940 | 950 | } |
| 941 | 951 | .buttonStyle(.plain) |
| 942 | 952 | } |
| 953 | .themedRow() | |
| 943 | 954 | } |
| 944 | 955 | } |
| 956 | .themedList() | |
| 945 | 957 | } |
| 946 | 958 | } |
| 947 | 959 | .navigationTitle("Filter Labels") |
| @@ -982,8 +994,10 @@ private struct SaveTicketFilterSheet: View { | ||
| 982 | 994 | Section("Name") { |
| 983 | 995 | TextField("Filter name", text: $name) |
| 984 | 996 | .textInputAutocapitalization(.words) |
| 997 | .themedRow() | |
| 985 | 998 | } |
| 986 | 999 | } |
| 1000 | .themedList() | |
| 987 | 1001 | .navigationTitle("Save Filter") |
| 988 | 1002 | .navigationBarTitleDisplayMode(.inline) |
| 989 | 1003 | .toolbar { |
| @@ -1085,6 +1099,7 @@ private struct BulkResolveSheet: View { | ||
| 1085 | 1099 | Text("\(viewModel.selectedTicketCount) ticket\(viewModel.selectedTicketCount == 1 ? "" : "s") selected") |
| 1086 | 1100 | .font(.subheadline) |
| 1087 | 1101 | .foregroundStyle(.secondary) |
| 1102 | .themedRow() | |
| 1088 | 1103 | } |
| 1089 | 1104 | |
| 1090 | 1105 | Section("Resolution") { |
| @@ -1095,8 +1110,10 @@ private struct BulkResolveSheet: View { | ||
| 1095 | 1110 | } |
| 1096 | 1111 | .pickerStyle(.inline) |
| 1097 | 1112 | .labelsHidden() |
| 1113 | .themedRow() | |
| 1098 | 1114 | } |
| 1099 | 1115 | } |
| 1116 | .themedList() | |
| 1100 | 1117 | .navigationTitle("Close Tickets") |
| 1101 | 1118 | .navigationBarTitleDisplayMode(.inline) |
| 1102 | 1119 | .toolbar { |
| @@ -1133,6 +1150,7 @@ private struct BulkAssignSheet: View { | ||
| 1133 | 1150 | Text("\(viewModel.selectedTicketCount) ticket\(viewModel.selectedTicketCount == 1 ? "" : "s") selected") |
| 1134 | 1151 | .font(.subheadline) |
| 1135 | 1152 | .foregroundStyle(.secondary) |
| 1153 | .themedRow() | |
| 1136 | 1154 | } |
| 1137 | 1155 | |
| 1138 | 1156 | if let currentUser { |
| @@ -1146,6 +1164,7 @@ private struct BulkAssignSheet: View { | ||
| 1146 | 1164 | } |
| 1147 | 1165 | } |
| 1148 | 1166 | .disabled(viewModel.selectedTicketCount == 0 || viewModel.isPerformingAction) |
| 1167 | .themedRow() | |
| 1149 | 1168 | } |
| 1150 | 1169 | } |
| 1151 | 1170 | |
| @@ -1154,8 +1173,10 @@ private struct BulkAssignSheet: View { | ||
| 1154 | 1173 | .textContentType(.username) |
| 1155 | 1174 | .autocorrectionDisabled() |
| 1156 | 1175 | .textInputAutocapitalization(.never) |
| 1176 | .themedRow() | |
| 1157 | 1177 | } |
| 1158 | 1178 | } |
| 1179 | .themedList() | |
| 1159 | 1180 | .navigationTitle("Assign Tickets") |
| 1160 | 1181 | .navigationBarTitleDisplayMode(.inline) |
| 1161 | 1182 | .toolbar { |
Hutch/Views/Tickets/TrackerListView.swift +3
| @@ -162,6 +162,7 @@ struct TrackerListView: View { | ||
| 162 | 162 | await viewModel.loadMoreIfNeeded(currentItem: tracker) |
| 163 | 163 | } |
| 164 | 164 | } |
| 165 | .themedRow() | |
| 165 | 166 | |
| 166 | 167 | if viewModel.isLoadingMore { |
| 167 | 168 | HStack { |
| @@ -170,8 +171,10 @@ struct TrackerListView: View { | ||
| 170 | 171 | Spacer() |
| 171 | 172 | } |
| 172 | 173 | .listRowSeparator(.hidden) |
| 174 | .themedRow() | |
| 173 | 175 | } |
| 174 | 176 | } |
| 177 | .themedList() | |
| 175 | 178 | .listStyle(.plain) |
| 176 | 179 | .searchable( |
| 177 | 180 | text: $vm.searchText, |
Hutch/Views/Tickets/TrackerManagementView.swift +37
| @@ -654,22 +654,27 @@ struct TrackerEditorSheet: View { | ||
| 654 | 654 | TextField("Tracker name", text: $name) |
| 655 | 655 | .textInputAutocapitalization(.never) |
| 656 | 656 | .autocorrectionDisabled() |
| 657 | .themedRow() | |
| 657 | 658 | TextField("Short description (optional)", text: $description, axis: .vertical) |
| 658 | 659 | .lineLimit(2...4) |
| 660 | .themedRow() | |
| 659 | 661 | Picker("Visibility", selection: $visibility) { |
| 660 | 662 | Text("Public").tag(Visibility.public) |
| 661 | 663 | Text("Unlisted").tag(Visibility.unlisted) |
| 662 | 664 | Text("Private").tag(Visibility.private) |
| 663 | 665 | } |
| 666 | .themedRow() | |
| 664 | 667 | } |
| 665 | 668 | |
| 666 | 669 | if let error, !error.isEmpty { |
| 667 | 670 | Section { |
| 668 | 671 | Text(error) |
| 669 | 672 | .foregroundStyle(.red) |
| 673 | .themedRow() | |
| 670 | 674 | } |
| 671 | 675 | } |
| 672 | 676 | } |
| 677 | .themedList() | |
| 673 | 678 | .navigationTitle(title) |
| 674 | 679 | .navigationBarTitleDisplayMode(.inline) |
| 675 | 680 | .toolbar { |
| @@ -718,10 +723,12 @@ struct TrackerACLManagementSheet: View { | ||
| 718 | 723 | List { |
| 719 | 724 | Section("Default Access") { |
| 720 | 725 | TrackerPermissionSummary(permissions: viewModel.defaultACL.permissions) |
| 726 | .themedRow() | |
| 721 | 727 | Button("Update Default ACL") { |
| 722 | 728 | editingDefaultACL = true |
| 723 | 729 | } |
| 724 | 730 | .disabled(viewModel.isSavingACL) |
| 731 | .themedRow() | |
| 725 | 732 | } |
| 726 | 733 | |
| 727 | 734 | Section { |
| @@ -731,9 +738,11 @@ struct TrackerACLManagementSheet: View { | ||
| 731 | 738 | ProgressView() |
| 732 | 739 | Spacer() |
| 733 | 740 | } |
| 741 | .themedRow() | |
| 734 | 742 | } else if viewModel.acls.isEmpty { |
| 735 | 743 | Text("No tracker-specific ACLs yet.") |
| 736 | 744 | .foregroundStyle(.secondary) |
| 745 | .themedRow() | |
| 737 | 746 | } else { |
| 738 | 747 | ForEach(viewModel.acls) { entry in |
| 739 | 748 | VStack(alignment: .leading, spacing: 6) { |
| @@ -756,6 +765,7 @@ struct TrackerACLManagementSheet: View { | ||
| 756 | 765 | .tint(.blue) |
| 757 | 766 | } |
| 758 | 767 | } |
| 768 | .themedRow() | |
| 759 | 769 | } |
| 760 | 770 | } header: { |
| 761 | 771 | Text("User ACLs") |
| @@ -763,6 +773,7 @@ struct TrackerACLManagementSheet: View { | ||
| 763 | 773 | Text("Each ACL must include all five permission flags.") |
| 764 | 774 | } |
| 765 | 775 | } |
| 776 | .themedList() | |
| 766 | 777 | .navigationTitle("ACLs") |
| 767 | 778 | .navigationBarTitleDisplayMode(.inline) |
| 768 | 779 | .toolbar { |
| @@ -908,6 +919,7 @@ private struct TrackerACLEditorSheet: View { | ||
| 908 | 919 | TextField("Username or ~username", text: $username) |
| 909 | 920 | .autocorrectionDisabled() |
| 910 | 921 | .textInputAutocapitalization(.never) |
| 922 | .themedRow() | |
| 911 | 923 | } |
| 912 | 924 | |
| 913 | 925 | permissionSection |
| @@ -916,9 +928,11 @@ private struct TrackerACLEditorSheet: View { | ||
| 916 | 928 | Section { |
| 917 | 929 | Text(error) |
| 918 | 930 | .foregroundStyle(.red) |
| 931 | .themedRow() | |
| 919 | 932 | } |
| 920 | 933 | } |
| 921 | 934 | } |
| 935 | .themedList() | |
| 922 | 936 | .navigationTitle(title) |
| 923 | 937 | .navigationBarTitleDisplayMode(.inline) |
| 924 | 938 | .toolbar { |
| @@ -950,10 +964,15 @@ private struct TrackerACLEditorSheet: View { | ||
| 950 | 964 | private var permissionSection: some View { |
| 951 | 965 | Section("Permissions") { |
| 952 | 966 | Toggle("Browse", isOn: $browse) |
| 967 | .themedRow() | |
| 953 | 968 | Toggle("Submit", isOn: $submit) |
| 969 | .themedRow() | |
| 954 | 970 | Toggle("Comment", isOn: $comment) |
| 971 | .themedRow() | |
| 955 | 972 | Toggle("Edit", isOn: $edit) |
| 973 | .themedRow() | |
| 956 | 974 | Toggle("Triage", isOn: $triage) |
| 975 | .themedRow() | |
| 957 | 976 | } |
| 958 | 977 | } |
| 959 | 978 | |
| @@ -1003,19 +1022,26 @@ private struct TrackerDefaultACLEditorSheet: View { | ||
| 1003 | 1022 | Form { |
| 1004 | 1023 | Section("Permissions") { |
| 1005 | 1024 | Toggle("Browse", isOn: $browse) |
| 1025 | .themedRow() | |
| 1006 | 1026 | Toggle("Submit", isOn: $submit) |
| 1027 | .themedRow() | |
| 1007 | 1028 | Toggle("Comment", isOn: $comment) |
| 1029 | .themedRow() | |
| 1008 | 1030 | Toggle("Edit", isOn: $edit) |
| 1031 | .themedRow() | |
| 1009 | 1032 | Toggle("Triage", isOn: $triage) |
| 1033 | .themedRow() | |
| 1010 | 1034 | } |
| 1011 | 1035 | |
| 1012 | 1036 | if let error, !error.isEmpty { |
| 1013 | 1037 | Section { |
| 1014 | 1038 | Text(error) |
| 1015 | 1039 | .foregroundStyle(.red) |
| 1040 | .themedRow() | |
| 1016 | 1041 | } |
| 1017 | 1042 | } |
| 1018 | 1043 | } |
| 1044 | .themedList() | |
| 1019 | 1045 | .navigationTitle("Default ACL") |
| 1020 | 1046 | .navigationBarTitleDisplayMode(.inline) |
| 1021 | 1047 | .toolbar { |
| @@ -1073,6 +1099,7 @@ struct TrackerLabelManagementSheet: View { | ||
| 1073 | 1099 | Text("Labels are managed here and reused throughout the tracker.") |
| 1074 | 1100 | .font(.footnote) |
| 1075 | 1101 | .foregroundStyle(.secondary) |
| 1102 | .themedRow() | |
| 1076 | 1103 | } |
| 1077 | 1104 | |
| 1078 | 1105 | if viewModel.isLoadingLabels { |
| @@ -1081,12 +1108,14 @@ struct TrackerLabelManagementSheet: View { | ||
| 1081 | 1108 | ProgressView() |
| 1082 | 1109 | Spacer() |
| 1083 | 1110 | } |
| 1111 | .themedRow() | |
| 1084 | 1112 | } else if viewModel.labels.isEmpty { |
| 1085 | 1113 | ContentUnavailableView( |
| 1086 | 1114 | "No Labels", |
| 1087 | 1115 | systemImage: "tag", |
| 1088 | 1116 | description: Text("Create labels for triage and organization.") |
| 1089 | 1117 | ) |
| 1118 | .themedRow() | |
| 1090 | 1119 | } else { |
| 1091 | 1120 | ForEach(viewModel.labels) { label in |
| 1092 | 1121 | Button { |
| @@ -1110,8 +1139,10 @@ struct TrackerLabelManagementSheet: View { | ||
| 1110 | 1139 | } |
| 1111 | 1140 | } |
| 1112 | 1141 | } |
| 1142 | .themedRow() | |
| 1113 | 1143 | } |
| 1114 | 1144 | } |
| 1145 | .themedList() | |
| 1115 | 1146 | .navigationTitle("Labels") |
| 1116 | 1147 | .navigationBarTitleDisplayMode(.inline) |
| 1117 | 1148 | .toolbar { |
| @@ -1261,8 +1292,11 @@ private struct TrackerLabelEditorSheet: View { | ||
| 1261 | 1292 | Form { |
| 1262 | 1293 | Section("Details") { |
| 1263 | 1294 | TextField("Label name", text: $name) |
| 1295 | .themedRow() | |
| 1264 | 1296 | ColorPicker("Foreground", selection: $foregroundColor, supportsOpacity: false) |
| 1297 | .themedRow() | |
| 1265 | 1298 | ColorPicker("Background", selection: $backgroundColor, supportsOpacity: false) |
| 1299 | .themedRow() | |
| 1266 | 1300 | } |
| 1267 | 1301 | |
| 1268 | 1302 | Section("Preview") { |
| @@ -1274,15 +1308,18 @@ private struct TrackerLabelEditorSheet: View { | ||
| 1274 | 1308 | foregroundColor: foregroundColor.hexString |
| 1275 | 1309 | ) |
| 1276 | 1310 | ) |
| 1311 | .themedRow() | |
| 1277 | 1312 | } |
| 1278 | 1313 | |
| 1279 | 1314 | if let error, !error.isEmpty { |
| 1280 | 1315 | Section { |
| 1281 | 1316 | Text(error) |
| 1282 | 1317 | .foregroundStyle(.red) |
| 1318 | .themedRow() | |
| 1283 | 1319 | } |
| 1284 | 1320 | } |
| 1285 | 1321 | } |
| 1322 | .themedList() | |
| 1286 | 1323 | .navigationTitle(title) |
| 1287 | 1324 | .navigationBarTitleDisplayMode(.inline) |
| 1288 | 1325 | .toolbar { |
Hutch/Views/Work/WorkView.swift +10 −1
| @@ -11,6 +11,7 @@ struct WorkView: View { | ||
| 11 | 11 | |
| 12 | 12 | @AppStorage(AppStorageKeys.swipeActionsEnabled, store: .standard) private var swipeActionsEnabled = true |
| 13 | 13 | @Environment(AppState.self) private var appState |
| 14 | @Environment(\.isAMOLEDTheme) private var isAMOLED | |
| 14 | 15 | @Environment(\.scenePhase) private var scenePhase |
| 15 | 16 | @State private var viewModel: HomeViewModel? |
| 16 | 17 | @State private var scope: Scope = .all |
| @@ -74,6 +75,7 @@ struct WorkView: View { | ||
| 74 | 75 | } |
| 75 | 76 | } |
| 76 | 77 | .padding(.vertical, 2) |
| 78 | .themedRow() | |
| 77 | 79 | } |
| 78 | 80 | } |
| 79 | 81 | |
| @@ -88,6 +90,7 @@ struct WorkView: View { | ||
| 88 | 90 | if workCount(viewModel) == 0 { |
| 89 | 91 | Section { |
| 90 | 92 | WorkCompactMessageRow(text: "Nothing to do", systemImage: "checkmark.circle") |
| 93 | .themedRow() | |
| 91 | 94 | } |
| 92 | 95 | } |
| 93 | 96 | } |
| @@ -100,7 +103,7 @@ struct WorkView: View { | ||
| 100 | 103 | } |
| 101 | 104 | } |
| 102 | 105 | .pickerStyle(.segmented) |
| 103 | .listRowBackground(Color.clear) | |
| 106 | .listRowBackground(isAMOLED ? Color.black : Color.clear) | |
| 104 | 107 | .listRowInsets(EdgeInsets()) |
| 105 | 108 | } |
| 106 | 109 | } |
| @@ -110,9 +113,11 @@ struct WorkView: View { | ||
| 110 | 113 | Section { |
| 111 | 114 | if isLoadingUnread(viewModel) { |
| 112 | 115 | WorkLoadingRow(label: "Loading unread threads") |
| 116 | .themedRow() | |
| 113 | 117 | } else if viewModel.unreadInboxThreads.isEmpty { |
| 114 | 118 | if compactWhenEmpty { |
| 115 | 119 | WorkCompactMessageRow(text: "No unread threads", systemImage: "tray") |
| 120 | .themedRow() | |
| 116 | 121 | } |
| 117 | 122 | } else { |
| 118 | 123 | ForEach(viewModel.unreadInboxThreads) { thread in |
| @@ -137,6 +142,7 @@ struct WorkView: View { | ||
| 137 | 142 | } |
| 138 | 143 | } |
| 139 | 144 | } |
| 145 | .themedRow() | |
| 140 | 146 | } |
| 141 | 147 | } header: { |
| 142 | 148 | Text("Unread Threads") |
| @@ -155,8 +161,10 @@ struct WorkView: View { | ||
| 155 | 161 | Section { |
| 156 | 162 | if viewModel.isLoadingAssignedTickets && viewModel.assignedTickets.isEmpty { |
| 157 | 163 | WorkLoadingRow(label: "Loading assigned tickets") |
| 164 | .themedRow() | |
| 158 | 165 | } else if viewModel.assignedTickets.isEmpty { |
| 159 | 166 | WorkCompactMessageRow(text: "No assigned tickets", systemImage: "person.crop.circle.badge.checkmark") |
| 167 | .themedRow() | |
| 160 | 168 | } else { |
| 161 | 169 | ForEach(viewModel.assignedTickets) { ticket in |
| 162 | 170 | NavigationLink { |
| @@ -200,6 +208,7 @@ struct WorkView: View { | ||
| 200 | 208 | } |
| 201 | 209 | } |
| 202 | 210 | } |
| 211 | .themedRow() | |
| 203 | 212 | } |
| 204 | 213 | } header: { |
| 205 | 214 | Text("Assigned Tickets") |