Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .codex/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
sandbox_mode = "workspace-write"

[sandbox_workspace_write]
writable_roots = [
"~/.local/state/tuist",
"~/.cache/tuist",
"~/Library/Developer/Xcode/DerivedData",
]
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,10 @@ private extension AppGraph {
func prepareTodayDependencies(_ dependencies: inout DependencyValues) {
TodayPresentationDependencyPreparation.prepare(
&dependencies,
fetchDisplayOptionsUseCase: userPreferencesGraphSet
.userPreferencesUseCaseGraph
.fetchTodayDisplayOptionsUseCase,
fetchTodosUseCase: todoGraphSet.todoUseCaseGraph.fetchTodosUseCase,
updateDisplayOptionsUseCase: userPreferencesGraphSet
.userPreferencesUseCaseGraph
.updateTodayDisplayOptionsUseCase
fetchCategoryPreferencesUseCase: todoGraphSet
.todoCategoryUseCaseGraph
.fetchTodoCategoryPreferencesUseCase
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ struct SearchView: View {
.font(.title)
.padding(6)
}
.adaptiveButtonStyle(shape: .circle, color: .border)
.adaptiveButtonStyle(shape: .circle, color: .border, glassEffect: .enabled)
SearchField(store: store)
}
.frame(maxWidth: .infinity, alignment: .leading)
Expand Down Expand Up @@ -86,7 +86,7 @@ struct SearchView: View {
}
Spacer()
}
.foregroundStyle(Color.accent)
.foregroundStyle(Color.onPrimaryContainer)
.padding()
.background {
Rectangle()
Expand Down Expand Up @@ -188,7 +188,7 @@ private struct SearchResults: View {
Int64(store.todos.count)
))
.font(.callout.bold())
.foregroundStyle(Color.accent)
.foregroundStyle(Color.onPrimaryContainer)
.padding(.horizontal, 12)
.padding(.vertical, 6)
.background(Color.primaryContainer, in: .capsule)
Expand Down Expand Up @@ -234,7 +234,6 @@ private struct SearchResults: View {
.background {
RoundedRectangle(cornerRadius: 16)
.fill(Color.surface)
.strokeBorder(Color.border, lineWidth: 2)
}
if store.shouldShowMoreTodos {
Button {
Expand All @@ -244,7 +243,7 @@ private struct SearchResults: View {
localized: "search_show_more",
bundle: PresentationResources.bundle)
)
.foregroundStyle(Color.accent)
.foregroundStyle(Color.onPrimaryContainer)
.font(.callout.bold())
}
.adaptiveButtonStyle(color: .primaryContainer)
Expand All @@ -257,21 +256,19 @@ private struct SearchResults: View {

private struct SearchResultRow: View {
@ScaledMetric(relativeTo: .title2) private var iconSize = CGFloat(48)
@Environment(\.colorScheme) private var colorScheme
let item: SearchTodoItem
private var isDarkMode: Bool { colorScheme == .dark }

var body: some View {
let category = TodoCategoryItem(from: item.category)

HStack(spacing: 12) {
RoundedRectangle(cornerRadius: 14)
.fill(category.color.opacity(isDarkMode ? 1 : 0.2))
.fill(category.color.opacity(0.2))
.frame(width: iconSize, height: iconSize)
.overlay {
Image(systemName: category.symbolName)
.font(.title3.bold())
.foregroundStyle(isDarkMode ? .white : category.color)
.foregroundStyle(category.color)
}
VStack(alignment: .leading, spacing: 4) {
Text(item.title)
Expand Down Expand Up @@ -355,7 +352,6 @@ private struct RecentSearchQuries: View {
.background {
RoundedRectangle(cornerRadius: 16)
.fill(Color.surface)
.strokeBorder(Color.border, lineWidth: 2)
}
}
.frame(maxWidth: .infinity)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import Core
import PresentationShared

public struct PushNotificationListView: View {
@Environment(\.colorScheme) private var colorScheme
@ScaledMetric(relativeTo: .body) private var headerHeight = 41
@ScaledMetric(relativeTo: .largeTitle) private var labelWidth = 34
@State private var headerOffset: CGFloat = 0
Expand Down Expand Up @@ -184,9 +183,10 @@ public struct PushNotificationListView: View {
} label: {
HStack(spacing: 6) {
Image(systemName: "line.3.horizontal.decrease")
.foregroundStyle(Color.onControlBackground)
filterBadge
}
.adaptiveButtonStyle()
.adaptiveButtonStyle(color: .controlBackground)
}
}

Expand All @@ -202,8 +202,8 @@ public struct PushNotificationListView: View {
store.query.sortOrder.title
)
)
.foregroundStyle(condition ? .white : Color(.label))
.adaptiveButtonStyle(color: condition ? .blue : .clear)
.foregroundStyle(condition ? Color.onPrimaryContainer : .onControlBackground)
.adaptiveButtonStyle(color: condition ? .primaryContainer : .controlBackground)
}
.frame(height: headerHeight)

Expand All @@ -221,8 +221,8 @@ public struct PushNotificationListView: View {
Text(String(localized: "push_period", bundle: PresentationResources.bundle))
Image(systemName: "chevron.down")
}
.foregroundStyle(condition ? Color(.label) : .white)
.adaptiveButtonStyle(color: condition ? .clear : .blue)
.foregroundStyle(condition ? Color.onControlBackground : .onPrimaryContainer)
.adaptiveButtonStyle(color: condition ? .controlBackground : .primaryContainer)
}

Button {
Expand All @@ -232,26 +232,21 @@ public struct PushNotificationListView: View {
} label: {
let condition = store.query.unreadOnly
Text(String(localized: "push_unread", bundle: PresentationResources.bundle))
.foregroundStyle(condition ? .white : Color(.label))
.adaptiveButtonStyle(color: condition ? .blue : .clear)
.foregroundStyle(condition ? Color.onPrimaryContainer : .onControlBackground)
.adaptiveButtonStyle(color: condition ? .primaryContainer : .controlBackground)
}
.frame(height: headerHeight)
}
}

private var filterBadge: some View {
let isDark = colorScheme == .dark
let blue = Color(uiColor: .systemBlue) // 흰 배경에 따른 청록색화 방지
let textColor: Color = isDark ? blue : .white
let backgroundColor: Color = isDark ? .white : blue

return Text("\(store.appliedFilterCount)")
Text("\(store.appliedFilterCount)")
.font(.caption2.weight(.bold))
.foregroundColor(textColor)
.foregroundStyle(Color.onPrimaryContainer)
.lineLimit(1)
.minimumScaleFactor(0.6)
.frame(width: 20, height: 20)
.background(Circle().fill(backgroundColor))
.background(Circle().fill(Color.primaryContainer))
}

// swiftlint:disable function_body_length
Expand Down
Loading