|
|
@ -10,6 +10,7 @@ import Model
|
|
|
|
|
|
|
|
|
|
|
|
struct BetLineLoading: View {
|
|
|
|
struct BetLineLoading: View {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@State var showInfos: Bool = false
|
|
|
|
var participations: [Participation]
|
|
|
|
var participations: [Participation]
|
|
|
|
|
|
|
|
|
|
|
|
var value: CGFloat {
|
|
|
|
var value: CGFloat {
|
|
|
@ -33,7 +34,7 @@ struct BetLineLoading: View {
|
|
|
|
|
|
|
|
|
|
|
|
var body: some View {
|
|
|
|
var body: some View {
|
|
|
|
GeometryReader { geometry in
|
|
|
|
GeometryReader { geometry in
|
|
|
|
VStack(alignment: .leading,spacing: 0){
|
|
|
|
VStack(alignment: .leading,spacing: 0) {
|
|
|
|
HStack(spacing: 5){
|
|
|
|
HStack(spacing: 5){
|
|
|
|
Text("OUI")
|
|
|
|
Text("OUI")
|
|
|
|
.font(.system(size: 25))
|
|
|
|
.font(.system(size: 25))
|
|
|
@ -44,7 +45,6 @@ struct BetLineLoading: View {
|
|
|
|
.font(.system(size: 25))
|
|
|
|
.font(.system(size: 25))
|
|
|
|
.fontWeight(.bold)
|
|
|
|
.fontWeight(.bold)
|
|
|
|
.foregroundColor(AllInColors.pink100)
|
|
|
|
.foregroundColor(AllInColors.pink100)
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ZStack(alignment: .leading) {
|
|
|
|
ZStack(alignment: .leading) {
|
|
|
|
HStack{
|
|
|
|
HStack{
|
|
|
@ -66,83 +66,104 @@ struct BetLineLoading: View {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
VStack(spacing: 1){
|
|
|
|
.padding(.bottom, 5)
|
|
|
|
HStack(spacing: 5){
|
|
|
|
|
|
|
|
Image("blueAllCoinIcon")
|
|
|
|
HStack {
|
|
|
|
.resizable()
|
|
|
|
Spacer()
|
|
|
|
.frame(width:12, height: 12)
|
|
|
|
Text("Détails")
|
|
|
|
Text(yesParticipations.reduce(0, {x,y in x + y.stake}).description)
|
|
|
|
.textStyle(weight: .medium, color: AllInColors.primaryTextColor, size: 10)
|
|
|
|
.font(.system(size: 15))
|
|
|
|
Image(showInfos ? "chevronUpIcon" : "chevronDownIcon")
|
|
|
|
.fontWeight(.bold)
|
|
|
|
.resizable()
|
|
|
|
.foregroundColor(AllInColors.blue200)
|
|
|
|
.frame(width: 10, height: 7)
|
|
|
|
Spacer()
|
|
|
|
.scaledToFill()
|
|
|
|
Text(noParticipations.reduce(0, {x,y in x + y.stake}).description)
|
|
|
|
}
|
|
|
|
.font(.system(size: 15))
|
|
|
|
.onTapGesture {
|
|
|
|
.fontWeight(.bold)
|
|
|
|
withAnimation {
|
|
|
|
.foregroundColor(AllInColors.pink100)
|
|
|
|
showInfos.toggle()
|
|
|
|
Image("pinkAllCoinIcon")
|
|
|
|
|
|
|
|
.resizable()
|
|
|
|
|
|
|
|
.frame(width: 12, height: 12)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
HStack(spacing: 5){
|
|
|
|
|
|
|
|
Image("bluePersonIcon")
|
|
|
|
|
|
|
|
.resizable()
|
|
|
|
|
|
|
|
.frame(width: 12, height: 12)
|
|
|
|
|
|
|
|
Text(yesParticipations.count.description)
|
|
|
|
|
|
|
|
.font(.system(size: 15))
|
|
|
|
|
|
|
|
.fontWeight(.bold)
|
|
|
|
|
|
|
|
.foregroundColor(AllInColors.blue200)
|
|
|
|
|
|
|
|
Spacer()
|
|
|
|
|
|
|
|
Text(noParticipations.count.description)
|
|
|
|
|
|
|
|
.font(.system(size: 15))
|
|
|
|
|
|
|
|
.fontWeight(.bold)
|
|
|
|
|
|
|
|
.foregroundColor(AllInColors.pink100)
|
|
|
|
|
|
|
|
Image("pinkPersonIcon")
|
|
|
|
|
|
|
|
.resizable()
|
|
|
|
|
|
|
|
.frame(width: 12, height: 12)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
HStack(spacing: 5){
|
|
|
|
|
|
|
|
Image("blueBadgeIcon")
|
|
|
|
|
|
|
|
.resizable()
|
|
|
|
|
|
|
|
.frame(width: 12, height: 12)
|
|
|
|
|
|
|
|
Text(yesParticipations.max(by: { $0.stake < $1.stake })?.stake.description ?? "0")
|
|
|
|
|
|
|
|
.font(.system(size: 15))
|
|
|
|
|
|
|
|
.fontWeight(.bold)
|
|
|
|
|
|
|
|
.foregroundColor(AllInColors.blue200)
|
|
|
|
|
|
|
|
Spacer()
|
|
|
|
|
|
|
|
Text(noParticipations.max(by: { $0.stake < $1.stake })?.stake.description ?? "0")
|
|
|
|
|
|
|
|
.font(.system(size: 15))
|
|
|
|
|
|
|
|
.fontWeight(.bold)
|
|
|
|
|
|
|
|
.foregroundColor(AllInColors.pink100)
|
|
|
|
|
|
|
|
Image("pinkBadgeIcon")
|
|
|
|
|
|
|
|
.resizable()
|
|
|
|
|
|
|
|
.frame(width: 12, height: 12)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
HStack(spacing: 5){
|
|
|
|
}
|
|
|
|
Image("blueTrophyIcon")
|
|
|
|
.padding(.bottom, 5)
|
|
|
|
.resizable()
|
|
|
|
.padding(.trailing, 5)
|
|
|
|
.frame(width: 12, height: 12)
|
|
|
|
|
|
|
|
Text("1.2")
|
|
|
|
if showInfos {
|
|
|
|
.font(.system(size: 15))
|
|
|
|
VStack(spacing: 1){
|
|
|
|
.fontWeight(.bold)
|
|
|
|
HStack(spacing: 5){
|
|
|
|
.foregroundColor(AllInColors.blue200)
|
|
|
|
Image("blueAllCoinIcon")
|
|
|
|
Spacer()
|
|
|
|
.resizable()
|
|
|
|
Text("1.2")
|
|
|
|
.frame(width:12, height: 12)
|
|
|
|
.font(.system(size: 15))
|
|
|
|
Text(yesParticipations.reduce(0, {x,y in x + y.stake}).description)
|
|
|
|
.fontWeight(.bold)
|
|
|
|
.font(.system(size: 15))
|
|
|
|
.foregroundColor(AllInColors.pink100)
|
|
|
|
.fontWeight(.bold)
|
|
|
|
Image("pinkTrophyIcon")
|
|
|
|
.foregroundColor(AllInColors.blue200)
|
|
|
|
.resizable()
|
|
|
|
Spacer()
|
|
|
|
.frame(width:12, height: 12)
|
|
|
|
Text(noParticipations.reduce(0, {x,y in x + y.stake}).description)
|
|
|
|
|
|
|
|
.font(.system(size: 15))
|
|
|
|
|
|
|
|
.fontWeight(.bold)
|
|
|
|
|
|
|
|
.foregroundColor(AllInColors.pink100)
|
|
|
|
|
|
|
|
Image("pinkAllCoinIcon")
|
|
|
|
|
|
|
|
.resizable()
|
|
|
|
|
|
|
|
.frame(width: 12, height: 12)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
HStack(spacing: 5){
|
|
|
|
|
|
|
|
Image("bluePersonIcon")
|
|
|
|
|
|
|
|
.resizable()
|
|
|
|
|
|
|
|
.frame(width: 12, height: 12)
|
|
|
|
|
|
|
|
Text(yesParticipations.count.description)
|
|
|
|
|
|
|
|
.font(.system(size: 15))
|
|
|
|
|
|
|
|
.fontWeight(.bold)
|
|
|
|
|
|
|
|
.foregroundColor(AllInColors.blue200)
|
|
|
|
|
|
|
|
Spacer()
|
|
|
|
|
|
|
|
Text(noParticipations.count.description)
|
|
|
|
|
|
|
|
.font(.system(size: 15))
|
|
|
|
|
|
|
|
.fontWeight(.bold)
|
|
|
|
|
|
|
|
.foregroundColor(AllInColors.pink100)
|
|
|
|
|
|
|
|
Image("pinkPersonIcon")
|
|
|
|
|
|
|
|
.resizable()
|
|
|
|
|
|
|
|
.frame(width: 12, height: 12)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
HStack(spacing: 5){
|
|
|
|
|
|
|
|
Image("blueBadgeIcon")
|
|
|
|
|
|
|
|
.resizable()
|
|
|
|
|
|
|
|
.frame(width: 12, height: 12)
|
|
|
|
|
|
|
|
Text(yesParticipations.max(by: { $0.stake < $1.stake })?.stake.description ?? "0")
|
|
|
|
|
|
|
|
.font(.system(size: 15))
|
|
|
|
|
|
|
|
.fontWeight(.bold)
|
|
|
|
|
|
|
|
.foregroundColor(AllInColors.blue200)
|
|
|
|
|
|
|
|
Spacer()
|
|
|
|
|
|
|
|
Text(noParticipations.max(by: { $0.stake < $1.stake })?.stake.description ?? "0")
|
|
|
|
|
|
|
|
.font(.system(size: 15))
|
|
|
|
|
|
|
|
.fontWeight(.bold)
|
|
|
|
|
|
|
|
.foregroundColor(AllInColors.pink100)
|
|
|
|
|
|
|
|
Image("pinkBadgeIcon")
|
|
|
|
|
|
|
|
.resizable()
|
|
|
|
|
|
|
|
.frame(width: 12, height: 12)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
HStack(spacing: 5){
|
|
|
|
|
|
|
|
Image("blueTrophyIcon")
|
|
|
|
|
|
|
|
.resizable()
|
|
|
|
|
|
|
|
.frame(width: 12, height: 12)
|
|
|
|
|
|
|
|
Text("1.2")
|
|
|
|
|
|
|
|
.font(.system(size: 15))
|
|
|
|
|
|
|
|
.fontWeight(.bold)
|
|
|
|
|
|
|
|
.foregroundColor(AllInColors.blue200)
|
|
|
|
|
|
|
|
Spacer()
|
|
|
|
|
|
|
|
Text("1.2")
|
|
|
|
|
|
|
|
.font(.system(size: 15))
|
|
|
|
|
|
|
|
.fontWeight(.bold)
|
|
|
|
|
|
|
|
.foregroundColor(AllInColors.pink100)
|
|
|
|
|
|
|
|
Image("pinkTrophyIcon")
|
|
|
|
|
|
|
|
.resizable()
|
|
|
|
|
|
|
|
.frame(width:12, height: 12)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Spacer()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}.frame(height: 140)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|