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
6 changes: 5 additions & 1 deletion GdeiAssistant-iOS/Core/DesignSystem/DSButton.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,13 @@ struct DSButton: View {

Text(title)
.font(.headline)
.lineLimit(2)
.multilineTextAlignment(.center)
}
.padding(.horizontal, 16)
.padding(.vertical, 14)
.frame(maxWidth: .infinity)
.frame(height: 50)
.frame(minHeight: 50)
.foregroundStyle(foregroundColor)
.background(backgroundColor)
.clipShape(RoundedRectangle(cornerRadius: 14, style: .continuous))
Expand Down
3 changes: 2 additions & 1 deletion GdeiAssistant-iOS/Core/DesignSystem/DSInputField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ struct DSInputField: View {
}
}
.padding(.horizontal, 14)
.frame(height: 48)
.padding(.vertical, 12)
.frame(minHeight: 48)
.background(Color(.tertiarySystemGroupedBackground))
.clipShape(RoundedRectangle(cornerRadius: 12, style: .continuous))
}
Expand Down
4 changes: 3 additions & 1 deletion GdeiAssistant-iOS/Core/DesignSystem/DSRemoteImageView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ struct DSRemoteImageView: View {
let urlString: String?
var cornerRadius: CGFloat = 16
var fallbackSystemImage: String = "photo"
var accessibilityLabel: String? = nil

var body: some View {
Group {
Expand All @@ -13,7 +14,7 @@ struct DSRemoteImageView: View {
case .success(let image):
image
.resizable()
.scaledToFill()
.scaledToFit()
case .empty:
placeholderView
case .failure:
Expand All @@ -28,6 +29,7 @@ struct DSRemoteImageView: View {
}
.background(DSColor.cardBackground)
.clipShape(RoundedRectangle(cornerRadius: cornerRadius, style: .continuous))
.accessibilityLabel(accessibilityLabel ?? localizedString("common.image"))
}

private var placeholderView: some View {
Expand Down
4 changes: 3 additions & 1 deletion GdeiAssistant-iOS/Core/DesignSystem/SecureFormField.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,11 @@ struct SecureFormField: View {
.foregroundStyle(DSColor.subtitle)
}
.buttonStyle(.plain)
.accessibilityLabel(localizedString(isSecureEntry ? "common.showPassword" : "common.hidePassword"))
}
.padding(.horizontal, 14)
.frame(height: 48)
.padding(.vertical, 12)
.frame(minHeight: 48)
.background(Color(.tertiarySystemGroupedBackground))
.clipShape(RoundedRectangle(cornerRadius: 12, style: .continuous))
}
Expand Down
26 changes: 16 additions & 10 deletions GdeiAssistant-iOS/Features/Dating/Views/DatingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,22 @@ struct DatingView: View {
}
.navigationTitle(localizedString("dating.title"))
.toolbar {
ToolbarItemGroup(placement: .topBarTrailing) {
NavigationLink(localizedString("dating.interactionCenter")) {
DatingCenterView(viewModel: container.makeDatingCenterViewModel())
}
ToolbarItem(placement: .topBarTrailing) {
Menu {
NavigationLink(localizedString("dating.interactionCenter")) {
DatingCenterView(viewModel: container.makeDatingCenterViewModel())
}

NavigationLink(localizedString("dating.publish")) {
PublishDatingView(
listViewModel: viewModel,
viewModel: container.makePublishDatingViewModel()
)
NavigationLink(localizedString("dating.publish")) {
PublishDatingView(
listViewModel: viewModel,
viewModel: container.makePublishDatingViewModel()
)
}
} label: {
Image(systemName: "ellipsis.circle")
}
.accessibilityLabel(localizedString("common.more"))
}
}
.task {
Expand Down Expand Up @@ -597,7 +602,7 @@ private struct PublishDatingView: View {
if let uiImage = UIImage(data: image.data) {
Image(uiImage: uiImage)
.resizable()
.scaledToFill()
.scaledToFit()
} else {
Rectangle()
.fill(Color(.tertiarySystemGroupedBackground))
Expand All @@ -608,6 +613,7 @@ private struct PublishDatingView: View {
}
}
.frame(width: 120, height: 120)
.background(Color(.tertiarySystemGroupedBackground))
.clipShape(RoundedRectangle(cornerRadius: 16, style: .continuous))
}

Expand Down
17 changes: 11 additions & 6 deletions GdeiAssistant-iOS/Features/Delivery/Views/DeliveryView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,18 @@ struct DeliveryView: View {
}
.navigationTitle(localizedString("delivery.title"))
.toolbar {
ToolbarItemGroup(placement: .topBarTrailing) {
NavigationLink(localizedString("delivery.mine")) {
MyDeliveryView(viewModel: viewModel)
}
NavigationLink(localizedString("delivery.publish")) {
PublishDeliveryView(viewModel: container.makePublishDeliveryViewModel(), listViewModel: viewModel)
ToolbarItem(placement: .topBarTrailing) {
Menu {
NavigationLink(localizedString("delivery.mine")) {
MyDeliveryView(viewModel: viewModel)
}
NavigationLink(localizedString("delivery.publish")) {
PublishDeliveryView(viewModel: container.makePublishDeliveryViewModel(), listViewModel: viewModel)
}
} label: {
Image(systemName: "ellipsis.circle")
}
.accessibilityLabel(localizedString("common.more"))
}
}
.task {
Expand Down
17 changes: 11 additions & 6 deletions GdeiAssistant-iOS/Features/Express/Views/ExpressView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,19 @@ struct ExpressView: View {
}
.navigationTitle(LocalizedStringKey("express.title"))
.toolbar {
ToolbarItemGroup(placement: .topBarTrailing) {
NavigationLink(LocalizedStringKey("express.mine")) {
MyExpressPostsView(viewModel: viewModel)
}
ToolbarItem(placement: .topBarTrailing) {
Menu {
NavigationLink(LocalizedStringKey("express.mine")) {
MyExpressPostsView(viewModel: viewModel)
}

NavigationLink(LocalizedStringKey("express.publish")) {
PublishExpressView(viewModel: container.makePublishExpressViewModel(), listViewModel: viewModel)
NavigationLink(LocalizedStringKey("express.publish")) {
PublishExpressView(viewModel: container.makePublishExpressViewModel(), listViewModel: viewModel)
}
} label: {
Image(systemName: "ellipsis.circle")
}
.accessibilityLabel(localizedString("common.more"))
}
}
.task {
Expand Down
26 changes: 16 additions & 10 deletions GdeiAssistant-iOS/Features/LostFound/Views/LostFoundView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,22 @@ struct LostFoundView: View {
}
.navigationTitle(localizedString("lostFound.title"))
.toolbar {
ToolbarItemGroup(placement: .topBarTrailing) {
NavigationLink(localizedString("lostFound.mine")) {
LostFoundProfileView(viewModel: viewModel)
}
ToolbarItem(placement: .topBarTrailing) {
Menu {
NavigationLink(localizedString("lostFound.mine")) {
LostFoundProfileView(viewModel: viewModel)
}

NavigationLink(localizedString("lostFound.publish")) {
PublishLostFoundView(
listViewModel: viewModel,
publishViewModel: container.makePublishLostFoundViewModel()
)
NavigationLink(localizedString("lostFound.publish")) {
PublishLostFoundView(
listViewModel: viewModel,
publishViewModel: container.makePublishLostFoundViewModel()
)
}
} label: {
Image(systemName: "ellipsis.circle")
}
.accessibilityLabel(localizedString("common.more"))
}
}
.task {
Expand Down Expand Up @@ -692,7 +697,7 @@ struct PublishLostFoundView: View {
if let uiImage = UIImage(data: image.data) {
Image(uiImage: uiImage)
.resizable()
.scaledToFill()
.scaledToFit()
} else {
Rectangle()
.fill(Color(.tertiarySystemGroupedBackground))
Expand All @@ -703,6 +708,7 @@ struct PublishLostFoundView: View {
}
}
.frame(width: 92, height: 92)
.background(Color(.tertiarySystemGroupedBackground))
.clipShape(RoundedRectangle(cornerRadius: 14, style: .continuous))
}
}
Expand Down
13 changes: 10 additions & 3 deletions GdeiAssistant-iOS/Features/Marketplace/Views/MarketplaceView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,22 @@ struct MarketplaceView: View {
.navigationTitle(AppDestination.marketplace.title)
.toolbar {
ToolbarItemGroup(placement: .topBarTrailing) {
NavigationLink(localizedString("marketplace.mine")) {
NavigationLink {
MarketplaceProfileView(viewModel: viewModel)
} label: {
Image(systemName: "person.crop.circle")
}
.accessibilityLabel(localizedString("marketplace.mine"))

NavigationLink(localizedString("marketplace.publish")) {
NavigationLink {
PublishMarketplaceView(
listViewModel: viewModel,
publishViewModel: container.makePublishMarketplaceViewModel()
)
} label: {
Image(systemName: "square.and.pencil")
}
.accessibilityLabel(localizedString("marketplace.publish"))
.accessibilityIdentifier("marketplace.publishEntry")
}
}
Expand Down Expand Up @@ -937,7 +943,7 @@ struct PublishMarketplaceView: View {
if let uiImage = UIImage(data: image.data) {
Image(uiImage: uiImage)
.resizable()
.scaledToFill()
.scaledToFit()
} else {
Rectangle()
.fill(Color(.tertiarySystemGroupedBackground))
Expand All @@ -948,6 +954,7 @@ struct PublishMarketplaceView: View {
}
}
.frame(width: 92, height: 92)
.background(Color(.tertiarySystemGroupedBackground))
.clipShape(RoundedRectangle(cornerRadius: 14, style: .continuous))
}
}
Expand Down
20 changes: 13 additions & 7 deletions GdeiAssistant-iOS/Features/Photograph/Views/PhotographView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,18 @@ struct PhotographView: View {
}
.navigationTitle(localizedString("photograph.title"))
.toolbar {
ToolbarItemGroup(placement: .topBarTrailing) {
NavigationLink(localizedString("photograph.mine")) {
MyPhotographPostsView(viewModel: viewModel)
}
NavigationLink(localizedString("photograph.publish")) {
PublishPhotographView(viewModel: container.makePublishPhotographViewModel(), listViewModel: viewModel)
ToolbarItem(placement: .topBarTrailing) {
Menu {
NavigationLink(localizedString("photograph.mine")) {
MyPhotographPostsView(viewModel: viewModel)
}
NavigationLink(localizedString("photograph.publish")) {
PublishPhotographView(viewModel: container.makePublishPhotographViewModel(), listViewModel: viewModel)
}
} label: {
Image(systemName: "ellipsis.circle")
}
.accessibilityLabel(localizedString("common.more"))
}
}
.task {
Expand Down Expand Up @@ -577,14 +582,15 @@ private struct PublishPhotographView: View {
if let uiImage = UIImage(data: image.data) {
Image(uiImage: uiImage)
.resizable()
.scaledToFill()
.scaledToFit()
} else {
Rectangle()
.fill(Color(.tertiarySystemGroupedBackground))
.overlay { Image(systemName: "photo") }
}
}
.frame(width: 92, height: 92)
.background(Color(.tertiarySystemGroupedBackground))
.clipShape(RoundedRectangle(cornerRadius: 14, style: .continuous))
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ struct AvatarEditView: View {

PhotosPicker(selection: $selectedPhotoItem, matching: .images) {
Label(localizedString("avatar.selectNew"), systemImage: "photo.badge.plus")
.padding(.horizontal, 16)
.padding(.vertical, 12)
.frame(maxWidth: .infinity)
.frame(height: 48)
.frame(minHeight: 48)
.background(DSColor.cardBackground)
.clipShape(RoundedRectangle(cornerRadius: 14, style: .continuous))
}
Expand Down
49 changes: 48 additions & 1 deletion GdeiAssistant-iOS/Features/Schedule/Views/ScheduleView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ struct ScheduleView: View {
}

private func content(_ schedule: WeeklySchedule) -> some View {
ScrollView {
let nonEmptyDays = schedule.days.filter { !$0.courses.isEmpty }

return ScrollView {
VStack(spacing: 14) {
DSCard {
HStack {
Expand Down Expand Up @@ -102,6 +104,7 @@ struct ScheduleView: View {
} else {
ForEach(viewModel.todayCourses) { course in
courseSummaryRow(course)
.onTapGesture { selectedCourse = course }
}
}
}
Expand All @@ -119,6 +122,28 @@ struct ScheduleView: View {
)
}
}

DSCard {
VStack(alignment: .leading, spacing: 12) {
Text(LocalizedStringKey("schedule.fullList"))
.font(.headline)
.foregroundStyle(DSColor.title)

Text(LocalizedStringKey("schedule.fullListHint"))
.font(.subheadline)
.foregroundStyle(DSColor.subtitle)

if nonEmptyDays.isEmpty {
Text(LocalizedStringKey("schedule.noCourses"))
.font(.subheadline)
.foregroundStyle(DSColor.subtitle)
} else {
ForEach(nonEmptyDays) { day in
dayCourseList(day)
}
}
}
}
}
.padding(16)
}
Expand Down Expand Up @@ -146,6 +171,28 @@ struct ScheduleView: View {
.padding(10)
.background(Color(.tertiarySystemGroupedBackground))
.clipShape(RoundedRectangle(cornerRadius: 10, style: .continuous))
.contentShape(RoundedRectangle(cornerRadius: 10, style: .continuous))
}

private func dayCourseList(_ day: CourseDaySection) -> some View {
VStack(alignment: .leading, spacing: 8) {
HStack(spacing: 8) {
Text(day.dayTitle)
.font(.subheadline.weight(.semibold))
.foregroundStyle(DSColor.primary)

if !day.dateText.isEmpty {
Text(day.dateText)
.font(.caption)
.foregroundStyle(DSColor.subtitle)
}
}

ForEach(day.courses) { course in
courseSummaryRow(course)
.onTapGesture { selectedCourse = course }
}
}
}

private func importBackground(from item: PhotosPickerItem?) async {
Expand Down
Loading