|
|
|
@ -18,7 +18,7 @@ struct DetailsView: View {
|
|
|
|
|
VStack(alignment: .trailing) {
|
|
|
|
|
HStack{
|
|
|
|
|
Spacer()
|
|
|
|
|
Image("CloseiconRounded")
|
|
|
|
|
Image("closeIcon")
|
|
|
|
|
.resizable()
|
|
|
|
|
.padding(8)
|
|
|
|
|
.frame(maxWidth: 40, maxHeight: 40)
|
|
|
|
@ -35,32 +35,43 @@ struct DetailsView: View {
|
|
|
|
|
VStack(alignment: .leading,spacing: 5){
|
|
|
|
|
HStack{
|
|
|
|
|
Spacer()
|
|
|
|
|
Text("proposé par Lucas").font(.system(size: 10)).foregroundColor(AllInColors.grey800Color)
|
|
|
|
|
Text("proposé par " + (viewModel.betDetail?.bet.author.username ?? "Unknown").capitalized)
|
|
|
|
|
.font(.system(size: 10))
|
|
|
|
|
.foregroundColor(AllInColors.grey800Color)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
Text("Etudes").font(.system(size: 15)).foregroundColor(AllInColors.grey800Color)
|
|
|
|
|
Text("Emre va réussir son TP de CI/CD mercredi?").font(.system(size: 20)).fontWeight(.bold).padding(.bottom, 10)
|
|
|
|
|
Text(viewModel.betDetail?.bet.theme ?? "Not loaded")
|
|
|
|
|
.font(.system(size: 15))
|
|
|
|
|
.foregroundColor(AllInColors.grey800Color)
|
|
|
|
|
Text(viewModel.betDetail?.bet.phrase ?? "Not loaded")
|
|
|
|
|
.font(.system(size: 20))
|
|
|
|
|
.fontWeight(.bold)
|
|
|
|
|
.padding(.bottom, 10)
|
|
|
|
|
HStack{
|
|
|
|
|
Text("Commence le").frame(maxWidth: 100).font(.system(size: 15)).foregroundColor(AllInColors.grey800Color)
|
|
|
|
|
TextCapsule(date: Date())
|
|
|
|
|
Text("Commence le")
|
|
|
|
|
.frame(maxWidth: 100)
|
|
|
|
|
.font(.system(size: 15))
|
|
|
|
|
.foregroundColor(AllInColors.grey800Color)
|
|
|
|
|
TextCapsule(date: viewModel.betDetail?.bet.endRegisterDate ?? Date())
|
|
|
|
|
Spacer()
|
|
|
|
|
|
|
|
|
|
}.padding(.bottom, 10)
|
|
|
|
|
HStack{
|
|
|
|
|
Text("Fini le").frame(maxWidth: 100).font(.system(size: 15)).foregroundColor(AllInColors.grey800Color)
|
|
|
|
|
TextCapsule(date: Date())
|
|
|
|
|
Text("Fini le")
|
|
|
|
|
.frame(maxWidth: 100)
|
|
|
|
|
.font(.system(size: 15))
|
|
|
|
|
.foregroundColor(AllInColors.grey800Color)
|
|
|
|
|
TextCapsule(date: viewModel.betDetail?.bet.endBetDate ?? Date())
|
|
|
|
|
Spacer()
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
.frame(width: .infinity)
|
|
|
|
|
.padding(.all,15).padding(.vertical, 10)
|
|
|
|
|
.background(AllInColors.componentBackgroundColor).cornerRadius(20, corners: [.topLeft,.topRight]).padding(.bottom,0)
|
|
|
|
|
.background(AllInColors.componentBackgroundColor)
|
|
|
|
|
.cornerRadius(20, corners: [.topLeft,.topRight]).padding(.bottom,0)
|
|
|
|
|
ResultBanner()
|
|
|
|
|
VStack(alignment: .leading, spacing: 2){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
.frame(maxWidth: /*@START_MENU_TOKEN@*/.infinity/*@END_MENU_TOKEN@*/, maxHeight: .infinity)
|
|
|
|
|
.padding([.bottom,.trailing,.leading],8)
|
|
|
|
@ -71,18 +82,14 @@ struct DetailsView: View {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
.frame(maxWidth: .infinity, maxHeight: geometry.size.height*0.98)
|
|
|
|
|
.background(Color.white)
|
|
|
|
|
.background(AllInColors.componentBackgroundColor)
|
|
|
|
|
.cornerRadius(15)
|
|
|
|
|
ParticipateButton().padding(10)
|
|
|
|
|
}
|
|
|
|
|
.transition(.slideInFromBottom(yOffset: 800))
|
|
|
|
|
.background(Color.white)
|
|
|
|
|
|
|
|
|
|
.edgesIgnoringSafeArea(.bottom)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
struct DetailsView_Previews: PreviewProvider {
|
|
|
|
|
static var previews: some View {
|
|
|
|
|
ContentView()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|