diff --git a/DevLog/Resource/Localizable.xcstrings b/DevLog/Resource/Localizable.xcstrings index d93cdcf..fdae106 100644 --- a/DevLog/Resource/Localizable.xcstrings +++ b/DevLog/Resource/Localizable.xcstrings @@ -359,7 +359,7 @@ "완료 상태" : { }, - "완료 시점" : { + "완료일" : { }, "읽지 않음" : { diff --git a/DevLog/UI/Common/TodoInfoSheetView.swift b/DevLog/UI/Common/TodoInfoSheetView.swift index 05e430c..af8ca64 100644 --- a/DevLog/UI/Common/TodoInfoSheetView.swift +++ b/DevLog/UI/Common/TodoInfoSheetView.swift @@ -24,10 +24,10 @@ struct TodoInfoSheetView: View { .foregroundStyle(.white) HStack(spacing: 8) { Image(systemName: "calendar") - .foregroundStyle(.white) Text(createdAt.formatted(date: .abbreviated, time: .omitted)) Spacer() } + .foregroundStyle(.white) .padding(.vertical, 10) .padding(.horizontal, 12) .background( diff --git a/DevLog/UI/Home/TodoEditorView.swift b/DevLog/UI/Home/TodoEditorView.swift index b716611..23f674c 100644 --- a/DevLog/UI/Home/TodoEditorView.swift +++ b/DevLog/UI/Home/TodoEditorView.swift @@ -138,8 +138,8 @@ struct TodoEditorView: View { Image(systemName: "tag") .foregroundStyle(.gray) } + .adaptiveButtonStyle() } - .adaptiveButtonStyle() DueDatePicker(selection: Binding( get: { viewModel.state.dueDate ?? Date() }, set: { viewModel.send(.setDueDate($0)) } @@ -161,8 +161,8 @@ struct TodoEditorView: View { viewModel.send(.setDueDate(viewModel.state.hasDueDate ? nil : Date())) } } + .adaptiveButtonStyle() } - .adaptiveButtonStyle() } } @@ -317,11 +317,11 @@ private struct TagEditor: View { Image(systemName: "plus") .font(.largeTitle) .foregroundStyle(Color.white) + .adaptiveButtonStyle( + shape: .circle, + color: (!tag.isEmpty && !tags.contains(tag)) ? Color.blue : .gray.opacity(0.4) + ) } - .adaptiveButtonStyle( - shape: .circle, - color: (!tag.isEmpty && !tags.contains(tag)) ? Color.blue : .gray.opacity(0.4) - ) .disabled(tag.isEmpty || tags.contains(tag)) } } diff --git a/DevLog/UI/Home/TodoListView.swift b/DevLog/UI/Home/TodoListView.swift index e30fc6e..4dff961 100644 --- a/DevLog/UI/Home/TodoListView.swift +++ b/DevLog/UI/Home/TodoListView.swift @@ -207,14 +207,13 @@ struct TodoListView: View { Text("정렬 순서") } } label: { + let condition = viewModel.state.query.sortTarget == .createdAt && viewModel.state.query.sortOrder == .latest HStack { Text("정렬: \(viewModel.state.query.sortTarget.title) / \(viewModel.state.query.sortOrder.title)") Image(systemName: "chevron.down") } - .adaptiveButtonStyle( - color: viewModel.state.query.sortTarget == .createdAt && - viewModel.state.query.sortOrder == .latest ? .clear : .blue - ) + .foregroundStyle(condition ? Color(.label) : .white) + .adaptiveButtonStyle(color: condition ? .clear : .blue) } } @@ -244,14 +243,13 @@ struct TodoListView: View { Text("완료 상태") } } label: { + let condition = viewModel.state.query.isPinned == true || viewModel.state.query.completionFilter != .all HStack { Text("필터 옵션") Image(systemName: "chevron.down") } - .adaptiveButtonStyle( - color: viewModel.state.query.isPinned == true || - viewModel.state.query.completionFilter != .all ? .blue : .clear - ) + .foregroundStyle(condition ? .white : Color(.label)) + .adaptiveButtonStyle(color: condition ? .blue : .clear) } } diff --git a/DevLog/UI/PushNotification/PushNotificationListView.swift b/DevLog/UI/PushNotification/PushNotificationListView.swift index e2dfb05..4411a6a 100644 --- a/DevLog/UI/PushNotification/PushNotificationListView.swift +++ b/DevLog/UI/PushNotification/PushNotificationListView.swift @@ -114,16 +114,18 @@ struct PushNotificationListView: View { Image(systemName: "line.3.horizontal.decrease") filterBadge } + .adaptiveButtonStyle() } - .adaptiveButtonStyle() } Button { viewModel.send(.toggleSortOption) } label: { + let condition = viewModel.state.query.sortOrder == .oldest Text("정렬: \(viewModel.state.query.sortOrder.title)") + .foregroundStyle(condition ? .white : Color(.label)) + .adaptiveButtonStyle(color: condition ? .blue : .clear) } - .adaptiveButtonStyle(color: viewModel.state.query.sortOrder == .oldest ? .blue : .clear) Menu { ForEach(PushNotificationQuery.TimeFilter.availableOptions, id: \.id) { option in @@ -142,17 +144,23 @@ struct PushNotificationListView: View { } } } label: { - Text("기간") + let condition = viewModel.state.query.timeFilter == .none + HStack { + Text("기간") + Image(systemName: "chevron.down") + } + .foregroundStyle(condition ? Color(.label) : .white) + .adaptiveButtonStyle(color: condition ? .clear : .blue) } - .adaptiveButtonStyle(color: viewModel.state.query.timeFilter == .none ? .clear : .blue) Button { viewModel.send(.toggleUnreadOnly) } label: { + let condition = viewModel.state.query.unreadOnly Text("읽지 않음") - .foregroundStyle(viewModel.state.query.unreadOnly ? .white : Color(.label)) + .foregroundStyle(condition ? .white : Color(.label)) + .adaptiveButtonStyle(color: condition ? .blue : .clear) } - .adaptiveButtonStyle(color: viewModel.state.query.unreadOnly ? .blue : .clear) } } .scrollIndicators(.never)