|
|
|
@ -44,13 +44,23 @@ struct ReviewCard: View {
|
|
|
|
|
VStack(alignment: .center,spacing:0){
|
|
|
|
|
HStack(){
|
|
|
|
|
Spacer()
|
|
|
|
|
if(betDetail.bet.endBetDate < Date()){
|
|
|
|
|
switch betDetail.bet.status {
|
|
|
|
|
case .inProgress:
|
|
|
|
|
Text(betDetail)
|
|
|
|
|
.foregroundColor(.white)
|
|
|
|
|
.font(.system(size: 25))
|
|
|
|
|
.fontWeight(.bold)
|
|
|
|
|
case .waiting:
|
|
|
|
|
Text("waiting")
|
|
|
|
|
.foregroundColor(.white)
|
|
|
|
|
.font(.system(size: 25))
|
|
|
|
|
.fontWeight(.bold)
|
|
|
|
|
case .closing:
|
|
|
|
|
Text("bet_finished")
|
|
|
|
|
.foregroundColor(.white)
|
|
|
|
|
.font(.system(size: 25))
|
|
|
|
|
.fontWeight(.bold)
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
case .finished:
|
|
|
|
|
Text(amountBetted.description)
|
|
|
|
|
.foregroundColor(.white)
|
|
|
|
|
.font(.system(size: 25))
|
|
|
|
@ -62,6 +72,11 @@ struct ReviewCard: View {
|
|
|
|
|
.foregroundColor(.white)
|
|
|
|
|
.font(.system(size: 25))
|
|
|
|
|
.fontWeight(.bold)
|
|
|
|
|
case .cancelled:
|
|
|
|
|
Text("cancelled")
|
|
|
|
|
.foregroundColor(.white)
|
|
|
|
|
.font(.system(size: 25))
|
|
|
|
|
.fontWeight(.bold)
|
|
|
|
|
}
|
|
|
|
|
Spacer()
|
|
|
|
|
|
|
|
|
@ -72,11 +87,18 @@ struct ReviewCard: View {
|
|
|
|
|
}
|
|
|
|
|
.frame(width: .infinity)
|
|
|
|
|
.padding(.all,2)
|
|
|
|
|
.background(
|
|
|
|
|
isAWin || betDetail.bet.endBetDate < Date() ?
|
|
|
|
|
AnyView(AllInColors.primaryGradient) :
|
|
|
|
|
AnyView(Color.black)
|
|
|
|
|
) .cornerRadius(20, corners: [.bottomLeft,.bottomRight])
|
|
|
|
|
.background({
|
|
|
|
|
switch betDetail.bet.status {
|
|
|
|
|
case .inProgress, .waiting, .closing:
|
|
|
|
|
return AllInColors.grey50Color
|
|
|
|
|
case .finished:
|
|
|
|
|
return Color.black
|
|
|
|
|
case .cancelled:
|
|
|
|
|
return Color.red
|
|
|
|
|
}
|
|
|
|
|
}())
|
|
|
|
|
|
|
|
|
|
.cornerRadius(20, corners: [.bottomLeft,.bottomRight])
|
|
|
|
|
.border(width: 1, edges: [.top], color: AllInColors.delimiterGrey)
|
|
|
|
|
}
|
|
|
|
|
.onTapGesture {
|
|
|
|
|