This commit is contained in:
Vladimir Dubovik
2025-04-03 11:10:21 +03:00
parent 99f2bd8a74
commit 14c229175c
30 changed files with 674 additions and 227 deletions

View File

@ -15,31 +15,31 @@ struct MonthTabView: View {
@ObservedObject var vm: ScheduleViewModel
var body: some View {
VStack {
HStack (spacing: 34) {
HStack (spacing: 33) {
ForEach(MockData.daysOfWeek.indices, id: \.self) { index in
Text(MockData.daysOfWeek[index])
.font(.custom("Montserrat-SemiBold", fixedSize: 15))
.foregroundColor(MockData.daysOfWeek[index] == "Вс" ? Color(.red) : Color("customGray2"))
.padding(.top, 13)
.foregroundColor(.gray)
}
}
.padding(.top, 14)
TabView(selection: $currentMonthIndex) {
ForEach(monthSlider.indices, id: \.self) { index in
let month = monthSlider[index]
MonthView(month)
.tag(index)
.transition(.slide)
}
}
.padding(.top, -25)
.padding(.bottom, -10)
.padding(.horizontal, -15)
.tabViewStyle(.page(indexDisplayMode: .never))
//.animation(.easeIn(duration: 0.3), value: currentMonthIndex)
}
.onAppear(perform: {
.frame(height: 220)
.padding(.top, 26)
.padding(.bottom, 20)
.onAppear {
updateMonthScreenViewForNewGroup()
})
}
.onChange(of: currentMonthIndex, initial: false) { oldValue, newValue in
if newValue == 0 || newValue == (monthSlider.count - 1) {
createMonth = true
@ -82,6 +82,3 @@ struct MonthTabView: View {
}
#Preview {
ContentView()
}

View File

@ -44,7 +44,3 @@ struct WeekTabView: View {
}
}
}
#Preview {
ContentView()
}