mirror of
https://github.com/yattee/yattee.git
synced 2026-07-21 14:52:03 +00:00
Add custom accent color with system color picker
Add a Custom swatch to the appearance settings accent color grid, backed by a hex value stored in settings (synced via iCloud like the rest). iOS uses the native ColorPicker wheel; macOS uses a circular swatch that opens NSColorPanel, since the SwiftUI color well looks out of place among the circles. All accent consumers now read the resolved color through SettingsManager.resolvedAccentColor. The indigo preset is retired from the grid but kept in the enum, so users who selected it keep their color until they pick another one. Claude-Session: https://claude.ai/code/session_0154KH8RAVAvm6iVanhmoW8o
This commit is contained in:
@@ -18,7 +18,7 @@ struct BookmarkCardView: View {
|
||||
var isCompact: Bool = false
|
||||
|
||||
private var accentColor: Color {
|
||||
appEnvironment?.settingsManager.accentColor.color ?? .accentColor
|
||||
appEnvironment?.settingsManager.resolvedAccentColor ?? .accentColor
|
||||
}
|
||||
|
||||
private var video: Video {
|
||||
|
||||
@@ -28,7 +28,7 @@ struct BookmarkRowView: View {
|
||||
var loadMoreVideos: LoadMoreVideosCallback? = nil
|
||||
|
||||
private var accentColor: Color {
|
||||
appEnvironment?.settingsManager.accentColor.color ?? .accentColor
|
||||
appEnvironment?.settingsManager.resolvedAccentColor ?? .accentColor
|
||||
}
|
||||
|
||||
private var isBookmarkValid: Bool {
|
||||
|
||||
@@ -15,7 +15,7 @@ struct BookmarkTagsView: View {
|
||||
var maxVisible: Int = 3
|
||||
|
||||
private var accentColor: Color {
|
||||
appEnvironment?.settingsManager.accentColor.color ?? .accentColor
|
||||
appEnvironment?.settingsManager.resolvedAccentColor ?? .accentColor
|
||||
}
|
||||
|
||||
private var visibleTags: [String] {
|
||||
|
||||
@@ -24,7 +24,7 @@ struct CommentView: View {
|
||||
private var contentService: ContentService? { appEnvironment?.contentService }
|
||||
private var instancesManager: InstancesManager? { appEnvironment?.instancesManager }
|
||||
private var navigationCoordinator: NavigationCoordinator? { appEnvironment?.navigationCoordinator }
|
||||
private var accentColor: Color { appEnvironment?.settingsManager.accentColor.color ?? .accentColor }
|
||||
private var accentColor: Color { appEnvironment?.settingsManager.resolvedAccentColor ?? .accentColor }
|
||||
|
||||
init(comment: Comment, videoID: String? = nil, source: ContentSource? = nil, isReply: Bool = false) {
|
||||
self.comment = comment
|
||||
|
||||
@@ -19,7 +19,7 @@ struct TagInputView: View {
|
||||
@FocusState private var textFieldFocused: Bool
|
||||
|
||||
private var accentColor: Color {
|
||||
appEnvironment?.settingsManager.accentColor.color ?? .accentColor
|
||||
appEnvironment?.settingsManager.resolvedAccentColor ?? .accentColor
|
||||
}
|
||||
|
||||
private let maxTags = 10
|
||||
|
||||
Reference in New Issue
Block a user