Skip to content

Commit fb05db4

Browse files
authored
Merge pull request #91 from OlegEremenko991/newDesign
Обновил экран создания/изменения мероприятия
2 parents d796083 + 14be471 commit fb05db4

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

SwiftUI-WorkoutApp/Screens/Events/Form/EventFormView.swift

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ struct EventFormView: View {
3434

3535
var body: some View {
3636
ScrollView {
37-
VStack(spacing: 0) {
37+
VStack(spacing: 16) {
3838
eventNameSection
39+
descriptionSection
3940
sportsGroundSection
4041
datePickerSection
41-
descriptionSection
4242
pickedImagesGrid
4343
saveButton
4444
}
45-
.padding([.horizontal, .bottom])
45+
.padding()
4646
}
4747
.loadingOverlay(if: viewModel.isLoading)
4848
.background(Color.swBackground)
@@ -82,8 +82,6 @@ private extension EventFormView {
8282
)
8383
.focused($focus, equals: .eventName)
8484
}
85-
.padding(.top, 22)
86-
.padding(.bottom, 16)
8785
}
8886

8987
var sportsGroundSection: some View {
@@ -133,12 +131,16 @@ private extension EventFormView {
133131
}
134132

135133
var datePickerSection: some View {
136-
DatePicker(
137-
"Дата и время",
138-
selection: $viewModel.eventForm.date,
139-
in: .now ... viewModel.maxEventFutureDate
140-
)
141-
.padding(.vertical, 22)
134+
VStack(spacing: 16) {
135+
SWDivider()
136+
DatePicker(
137+
"Дата и время",
138+
selection: $viewModel.eventForm.date,
139+
in: .now ... viewModel.maxEventFutureDate
140+
)
141+
SWDivider()
142+
}
143+
.padding(.bottom, 10)
142144
}
143145

144146
var descriptionSection: some View {
@@ -160,8 +162,6 @@ private extension EventFormView {
160162
selectionLimit: viewModel.imagesLimit,
161163
processExtraImages: { viewModel.deleteExtraImagesIfNeeded() }
162164
)
163-
.padding(.top, 22)
164-
.padding(.bottom, 42)
165165
}
166166

167167
var saveButton: some View {
@@ -172,6 +172,7 @@ private extension EventFormView {
172172
}
173173
}
174174
.buttonStyle(SWButtonStyle(mode: .filled, size: .large))
175+
.padding(.top, 42)
175176
.disabled(
176177
!viewModel.isFormReady
177178
|| viewModel.isLoading

0 commit comments

Comments
 (0)