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
2 changes: 1 addition & 1 deletion DevLog/Resource/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@
"완료 상태" : {

},
"완료 시점" : {
"완료일" : {

},
"읽지 않음" : {
Expand Down
2 changes: 1 addition & 1 deletion DevLog/UI/Common/TodoInfoSheetView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
12 changes: 6 additions & 6 deletions DevLog/UI/Home/TodoEditorView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,8 @@ struct TodoEditorView: View {
Image(systemName: "tag")
.foregroundStyle(.gray)
}
.adaptiveButtonStyle()
}
Comment on lines +141 to 142

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

.adaptiveButtonStyle() modifier 위치를 조정하여 가독성을 높입니다.

                }
                .adaptiveButtonStyle()
            }

.adaptiveButtonStyle()
DueDatePicker(selection: Binding(
get: { viewModel.state.dueDate ?? Date() },
set: { viewModel.send(.setDueDate($0)) }
Expand All @@ -161,8 +161,8 @@ struct TodoEditorView: View {
viewModel.send(.setDueDate(viewModel.state.hasDueDate ? nil : Date()))
}
}
.adaptiveButtonStyle()
}
Comment on lines +164 to 165

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

.adaptiveButtonStyle() modifier 위치를 조정하여 가독성을 높입니다.

                }
                .adaptiveButtonStyle()
            }

.adaptiveButtonStyle()
}
}

Expand Down Expand Up @@ -317,11 +317,11 @@ private struct TagEditor<Content: View>: View {
Image(systemName: "plus")
.font(.largeTitle)
.foregroundStyle(Color.white)
.adaptiveButtonStyle(
shape: .circle,
Comment on lines +320 to +321

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

.adaptiveButtonStyle() modifier 위치를 조정하여 가독성을 높입니다.

                    .foregroundStyle(Color.white)
                    .adaptiveButtonStyle(
                        shape: .circle,
                        color: (!tag.isEmpty && !tags.contains(tag)) ? Color.blue : .gray.opacity(0.4)
                    )

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))
}
}
Expand Down
14 changes: 6 additions & 8 deletions DevLog/UI/Home/TodoListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Comment on lines +210 to +216

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

조건 변수를 추출하여 코드 가독성을 높이고, .foregroundStyle modifier를 추가하여 UI를 개선합니다.

Suggested change
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)
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")
}
.foregroundStyle(condition ? Color(.label) : .white)
.adaptiveButtonStyle(color: condition ? .clear : .blue)

}
}

Expand Down Expand Up @@ -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)
}
}

Expand Down
20 changes: 14 additions & 6 deletions DevLog/UI/PushNotification/PushNotificationListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -114,16 +114,18 @@ struct PushNotificationListView: View {
Image(systemName: "line.3.horizontal.decrease")
filterBadge
}
.adaptiveButtonStyle()
}
Comment on lines +117 to 118

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

.adaptiveButtonStyle() modifier 위치를 조정하여 가독성을 높입니다.

Suggested change
.adaptiveButtonStyle()
}
}
.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)
Comment on lines +124 to +127

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

조건 변수를 추출하고, .foregroundStyle modifier를 추가하여 UI를 개선합니다.

Suggested change
let condition = viewModel.state.query.sortOrder == .oldest
Text("정렬: \(viewModel.state.query.sortOrder.title)")
.foregroundStyle(condition ? .white : Color(.label))
.adaptiveButtonStyle(color: condition ? .blue : .clear)
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
Expand All @@ -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)
Comment on lines +147 to +153

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

조건 변수를 추출하고, HStack을 사용하여 UI를 개선합니다.

Suggested change
let condition = viewModel.state.query.timeFilter == .none
HStack {
Text("기간")
Image(systemName: "chevron.down")
}
.foregroundStyle(condition ? Color(.label) : .white)
.adaptiveButtonStyle(color: condition ? .clear : .blue)
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)
Expand Down