summaryrefslogtreecommitdiff
path: root/Hutch/Views/Repositories/RepositoryACLView.swift
diff options
context:
space:
mode:
authorChristian Cleberg <[email protected]>2026-04-13 19:06:54 -0500
committerChristian Cleberg <[email protected]>2026-04-13 19:06:54 -0500
commita6ad2b9815d72575206bdca860eef9db850cdf1c (patch)
treeb4d5f27aa1655e5e40bab178550d6e2576d7df8b /Hutch/Views/Repositories/RepositoryACLView.swift
parent02a44d115b3784231cad640e992d9c18a7f67b40 (diff)
downloadhutch-a6ad2b9815d72575206bdca860eef9db850cdf1c.tar.gz
hutch-a6ad2b9815d72575206bdca860eef9db850cdf1c.tar.bz2
hutch-a6ad2b9815d72575206bdca860eef9db850cdf1c.zip
feat(theme): AMOLED true-black rows via themedRow()
Apply listRowBackground(Color.black) per row in AMOLED mode using ThemedRowStyle and themedRow() across Lists and Forms. Use themedList() for scroll/grouped backgrounds. Treat segmented and clear list rows with isAMOLED-aware listRowBackground where Color.clear was required. Removes reliance on UIKit appearance for list cells on iOS 16+. Implements: https://todo.sr.ht/~ccleberg/hutch/24
Diffstat (limited to 'Hutch/Views/Repositories/RepositoryACLView.swift')
-rw-r--r--Hutch/Views/Repositories/RepositoryACLView.swift9
1 files changed, 8 insertions, 1 deletions
diff --git a/Hutch/Views/Repositories/RepositoryACLView.swift b/Hutch/Views/Repositories/RepositoryACLView.swift
index 0368b4f..29ded84 100644
--- a/Hutch/Views/Repositories/RepositoryACLView.swift
+++ b/Hutch/Views/Repositories/RepositoryACLView.swift
@@ -6,6 +6,7 @@ struct RepositoryACLView: View {
let showsDoneButton: Bool
@Environment(\.dismiss) private var dismiss
+ @Environment(\.isAMOLEDTheme) private var isAMOLED
@State private var viewModel: RepositoryACLViewModel?
@State private var pendingDeletion: RepositoryACLEntry?
@State private var showAddSheet = false
@@ -70,7 +71,7 @@ struct RepositoryACLView: View {
Text("Only the repository owner currently has access.")
}
.frame(maxWidth: .infinity)
- .listRowBackground(Color.clear)
+ .listRowBackground(isAMOLED ? Color.black : Color.clear)
} else {
Section {
ForEach(viewModel.visibleEntries) { entry in
@@ -86,9 +87,11 @@ struct RepositoryACLView: View {
}
)
}
+ .themedRow()
}
}
}
+ .themedList()
.listStyle(.insetGrouped)
.refreshable {
await viewModel.load()
@@ -192,11 +195,13 @@ private struct RepositoryACLAddUserView: View {
TextField("Username or ~username", text: $viewModel.addUsername)
.autocorrectionDisabled()
.textInputAutocapitalization(.never)
+ .themedRow()
if let validation = inlineValidationMessage {
Text(validation)
.font(.caption)
.foregroundStyle(.secondary)
+ .themedRow()
}
}
@@ -207,8 +212,10 @@ private struct RepositoryACLAddUserView: View {
}
}
.pickerStyle(.segmented)
+ .themedRow()
}
}
+ .themedList()
.navigationTitle("Add User")
.navigationBarTitleDisplayMode(.inline)
.toolbar {