diff --git a/Sources/allin/allin.xcodeproj/project.pbxproj b/Sources/allin/allin.xcodeproj/project.pbxproj index 288b43e..78d7258 100644 --- a/Sources/allin/allin.xcodeproj/project.pbxproj +++ b/Sources/allin/allin.xcodeproj/project.pbxproj @@ -20,6 +20,9 @@ EC2C1EED2AC093820091D57C /* TextCapsule.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC2C1EEC2AC093820091D57C /* TextCapsule.swift */; }; EC2C1EEF2AC098D30091D57C /* UsersPreview.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC2C1EEE2AC098D30091D57C /* UsersPreview.swift */; }; EC3737E42AC2F5FB00E6BDB5 /* ChoiceCapsule.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC3737E32AC2F5FB00E6BDB5 /* ChoiceCapsule.swift */; }; + EC3737E62AC41DB000E6BDB5 /* WinModal.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC3737E52AC41DB000E6BDB5 /* WinModal.swift */; }; + EC3737E82AC5A53B00E6BDB5 /* AllcoinsCapsule.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC3737E72AC5A53B00E6BDB5 /* AllcoinsCapsule.swift */; }; + EC3737EA2AC5A58B00E6BDB5 /* RecapBetCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC3737E92AC5A58B00E6BDB5 /* RecapBetCard.swift */; }; EC46D7DD2ABCCC270030AC04 /* MenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC46D7DC2ABCCC270030AC04 /* MenuView.swift */; }; EC46D7DF2ABCE0A20030AC04 /* ParameterMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC46D7DE2ABCE0A20030AC04 /* ParameterMenuView.swift */; }; EC50BF962ABF4D3300197685 /* SplashScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC50BF952ABF4D3300197685 /* SplashScreen.swift */; }; @@ -72,6 +75,9 @@ EC2C1EEC2AC093820091D57C /* TextCapsule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TextCapsule.swift; path = allin/Views/TextCapsule.swift; sourceTree = SOURCE_ROOT; }; EC2C1EEE2AC098D30091D57C /* UsersPreview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = UsersPreview.swift; path = allin/Views/UsersPreview.swift; sourceTree = SOURCE_ROOT; }; EC3737E32AC2F5FB00E6BDB5 /* ChoiceCapsule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ChoiceCapsule.swift; path = allin/Views/ChoiceCapsule.swift; sourceTree = SOURCE_ROOT; }; + EC3737E52AC41DB000E6BDB5 /* WinModal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = WinModal.swift; path = allin/Screens/WinModal.swift; sourceTree = SOURCE_ROOT; }; + EC3737E72AC5A53B00E6BDB5 /* AllcoinsCapsule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = AllcoinsCapsule.swift; path = allin/Views/AllcoinsCapsule.swift; sourceTree = SOURCE_ROOT; }; + EC3737E92AC5A58B00E6BDB5 /* RecapBetCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = RecapBetCard.swift; path = allin/Views/RecapBetCard.swift; sourceTree = SOURCE_ROOT; }; EC46D7DC2ABCCC270030AC04 /* MenuView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = MenuView.swift; path = allin/Views/MenuView.swift; sourceTree = SOURCE_ROOT; }; EC46D7DE2ABCE0A20030AC04 /* ParameterMenuView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ParameterMenuView.swift; path = allin/Views/ParameterMenuView.swift; sourceTree = SOURCE_ROOT; }; EC50BF952ABF4D3300197685 /* SplashScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = SplashScreen.swift; path = allin/Screens/SplashScreen.swift; sourceTree = SOURCE_ROOT; }; @@ -128,6 +134,8 @@ EC3737E32AC2F5FB00E6BDB5 /* ChoiceCapsule.swift */, ECA7010A2AC4003400532444 /* RankingRowView.swift */, ECA7010E2AC4949D00532444 /* FriendView.swift */, + EC3737E72AC5A53B00E6BDB5 /* AllcoinsCapsule.swift */, + EC3737E92AC5A58B00E6BDB5 /* RecapBetCard.swift */, ); path = Views; sourceTree = ""; @@ -220,6 +228,7 @@ EC8601F42AC37919004262C8 /* HomeScreen.swift */, ECA701082AC3FE3300532444 /* RankingScreen.swift */, ECA7010C2AC4948600532444 /* FriendsScreen.swift */, + EC3737E52AC41DB000E6BDB5 /* WinModal.swift */, ); path = Screens; sourceTree = ""; @@ -370,9 +379,12 @@ EC2C1EEB2AC08BE80091D57C /* BetCard.swift in Sources */, ECA7010F2AC4949D00532444 /* FriendView.swift in Sources */, EC87FCD92ABBA60900363986 /* Colors.swift in Sources */, + EC3737E82AC5A53B00E6BDB5 /* AllcoinsCapsule.swift in Sources */, + EC3737EA2AC5A58B00E6BDB5 /* RecapBetCard.swift in Sources */, D98C4D662AB9D017007A6B4D /* ContentView.swift in Sources */, D92EC57C2ABADA2800CCD30E /* CoinCounterView.swift in Sources */, EC3737E42AC2F5FB00E6BDB5 /* ChoiceCapsule.swift in Sources */, + EC3737E62AC41DB000E6BDB5 /* WinModal.swift in Sources */, EC2C1EED2AC093820091D57C /* TextCapsule.swift in Sources */, D98C4D8E2AB9D440007A6B4D /* TopBarView.swift in Sources */, EC50BF962ABF4D3300197685 /* SplashScreen.swift in Sources */, diff --git a/Sources/allin/allin/Assets.xcassets/Allcoins.imageset/Contents.json b/Sources/allin/allin/Assets.xcassets/Allcoins.imageset/Contents.json new file mode 100644 index 0000000..b1eca72 --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/Allcoins.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Vector-3.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/allin/allin/Assets.xcassets/Allcoins.imageset/Vector-3.png b/Sources/allin/allin/Assets.xcassets/Allcoins.imageset/Vector-3.png new file mode 100644 index 0000000..128a9dc Binary files /dev/null and b/Sources/allin/allin/Assets.xcassets/Allcoins.imageset/Vector-3.png differ diff --git a/Sources/allin/allin/Assets.xcassets/BackGradiant.imageset/Contents.json b/Sources/allin/allin/Assets.xcassets/BackGradiant.imageset/Contents.json new file mode 100644 index 0000000..f1237af --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/BackGradiant.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "image 16.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/allin/allin/Assets.xcassets/BackGradiant.imageset/image 16.png b/Sources/allin/allin/Assets.xcassets/BackGradiant.imageset/image 16.png new file mode 100644 index 0000000..dfdd829 Binary files /dev/null and b/Sources/allin/allin/Assets.xcassets/BackGradiant.imageset/image 16.png differ diff --git a/Sources/allin/allin/Assets.xcassets/BackGradiant2.imageset/Contents.json b/Sources/allin/allin/Assets.xcassets/BackGradiant2.imageset/Contents.json new file mode 100644 index 0000000..cdaf065 --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/BackGradiant2.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "image 17.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/allin/allin/Assets.xcassets/BackGradiant2.imageset/image 17.png b/Sources/allin/allin/Assets.xcassets/BackGradiant2.imageset/image 17.png new file mode 100644 index 0000000..04c25c2 Binary files /dev/null and b/Sources/allin/allin/Assets.xcassets/BackGradiant2.imageset/image 17.png differ diff --git a/Sources/allin/allin/Assets.xcassets/Close_icon.imageset/Contents.json b/Sources/allin/allin/Assets.xcassets/Close_icon.imageset/Contents.json new file mode 100644 index 0000000..538e0c7 --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/Close_icon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Group 105.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/allin/allin/Assets.xcassets/Close_icon.imageset/Group 105.png b/Sources/allin/allin/Assets.xcassets/Close_icon.imageset/Group 105.png new file mode 100644 index 0000000..acc68f6 Binary files /dev/null and b/Sources/allin/allin/Assets.xcassets/Close_icon.imageset/Group 105.png differ diff --git a/Sources/allin/allin/Assets.xcassets/ModalBackground.imageset/Contents.json b/Sources/allin/allin/Assets.xcassets/ModalBackground.imageset/Contents.json new file mode 100644 index 0000000..4a47ed1 --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/ModalBackground.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "Rectangle 90.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/allin/allin/Assets.xcassets/ModalBackground.imageset/Rectangle 90.png b/Sources/allin/allin/Assets.xcassets/ModalBackground.imageset/Rectangle 90.png new file mode 100644 index 0000000..afdcbae Binary files /dev/null and b/Sources/allin/allin/Assets.xcassets/ModalBackground.imageset/Rectangle 90.png differ diff --git a/Sources/allin/allin/Screens/BetScreen.swift b/Sources/allin/allin/Screens/BetScreen.swift index bc5d4ee..7e64f0c 100644 --- a/Sources/allin/allin/Screens/BetScreen.swift +++ b/Sources/allin/allin/Screens/BetScreen.swift @@ -23,7 +23,12 @@ struct Bet: View { VStack(spacing: 20){ BetCard() BetCard() - BetCard() + Button("Show Sheet") { + showingSheet.toggle() + } + .sheet(isPresented: $showingSheet) { + WinModal() + } }.padding([.leading,.trailing],25) } header: { ZStack{ diff --git a/Sources/allin/allin/Screens/WinModal.swift b/Sources/allin/allin/Screens/WinModal.swift new file mode 100644 index 0000000..c34d143 --- /dev/null +++ b/Sources/allin/allin/Screens/WinModal.swift @@ -0,0 +1,233 @@ +// +// WinModal.swift +// AllIn +// +// Created by étudiant on 27/09/2023. +// + +import SwiftUI + +struct WinModal: View { + @Environment(\.dismiss) var dismiss + + @State var xOffset: CGFloat = 0 + var body: some View { + ZStack{ + GeometryReader { geometry in + let size = geometry.size.width / 20 + + InfiniteScroller(contentWidth: size * 20) { + + VStack(spacing: 20) { + + VStack(spacing: 20) { + HStack(spacing: 20){ + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110,height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + } + HStack(spacing: 20){ + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110,height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + } + HStack(spacing: 20){ + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110,height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + } + HStack(spacing: 20){ + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110,height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + } + HStack(spacing:20){ + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110,height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + } + HStack(spacing: 20){ + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110,height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + } + HStack(spacing: 20){ + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110,height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + } + HStack(spacing: 20){ + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110,height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + } + HStack(spacing: 20){ + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110,height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + } + HStack(spacing: 20){ + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110,height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + } + + + } + VStack(spacing: 20) { + HStack(spacing: 20){ + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110,height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + } + HStack(spacing: 20){ + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110,height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + } + HStack(spacing: 20){ + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110,height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + } + HStack(spacing: 20){ + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110,height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + } + HStack(spacing:20){ + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110,height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + } + HStack(spacing: 20){ + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110,height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + } + HStack(spacing: 20){ + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110,height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + } + HStack(spacing: 20){ + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110,height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + } + HStack(spacing: 20){ + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110,height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + } + HStack(spacing: 20){ + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + Image("Allcoins").resizable().frame(width: 110,height:110) + Image("Allcoins").resizable().frame(width: 110, height:110) + } + + + } + + + }.padding(10) + } + VStack { + ZStack(alignment: .topLeading){ + HStack{ + Spacer() + Image("Icon").resizable().frame(width: 35, height: 35) + Spacer() + } + + Image("Close_icon").resizable().frame(width: 25, height: 25).onTapGesture { + dismiss() + } + + } + HStack{ + Text("FÉLICITATIONS").font(.system(size: 20)).foregroundColor(.white).fontWeight(.semibold).italic() + Text("PSEUDO!").padding(.top,9).font(.system(size: 33)).fontWeight(.heavy).foregroundColor(.white) + }.rotationEffect(.degrees(-4)).padding(.top,40) + Spacer() + AllcoinsCapsule() + Spacer() + RecapBetCard() + Spacer() + + + + + }.padding([.all],20) + } + + }.background( + Image("ModalBackground") + .resizable() + .edgesIgnoringSafeArea(.all) + .frame(width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height)) + + } +} + +struct WinModal_Previews: PreviewProvider { + static var previews: some View { + WinModal() + } +} + +struct InfiniteScroller: View { + var contentWidth: CGFloat + var content: (() -> Content) + + @State + var xOffset: CGFloat = -800 + + var body: some View { + ScrollView(.horizontal, showsIndicators: false) { + HStack(spacing: 0) { + + content() + content() + content() + content() + content() + content() + content() + content() + + + + } + .offset(x: xOffset, y: 0) + } + .disabled(true) + .onAppear { + withAnimation(.linear(duration: 25).repeatForever(autoreverses: false)) { + xOffset = +contentWidth + } + }.frame(width: 1200).rotationEffect(.degrees(-30)).opacity(0.04) + } +} + + diff --git a/Sources/allin/allin/Views/AllcoinsCapsule.swift b/Sources/allin/allin/Views/AllcoinsCapsule.swift new file mode 100644 index 0000000..7191408 --- /dev/null +++ b/Sources/allin/allin/Views/AllcoinsCapsule.swift @@ -0,0 +1,26 @@ +// +// AllcoinsCapsule.swift +// AllIn +// +// Created by étudiant on 28/09/2023. +// + +import SwiftUI + +struct AllcoinsCapsule: View { + var body: some View { + Text("Vous remportez").foregroundColor(.white) + HStack{ + Text("2340").betTextStyle(weight: .bold, color: .white, size: 60) + Image("Allcoins").resizable().frame(width: 40, height:40).scaledToFit() + }.padding([.leading,.trailing],30).padding([.top,.bottom],10).background(.white.opacity(0.09)).cornerRadius(999, corners: .allCorners).clipShape(Capsule()).overlay( /// apply a rounded border + RoundedRectangle(cornerRadius: 999) + .stroke(.white, lineWidth: 1.5)) + } +} + +struct AllcoinsCapsule_Previews: PreviewProvider { + static var previews: some View { + AllcoinsCapsule() + } +} diff --git a/Sources/allin/allin/Views/BetCard.swift b/Sources/allin/allin/Views/BetCard.swift index 70cb769..aa59869 100644 --- a/Sources/allin/allin/Views/BetCard.swift +++ b/Sources/allin/allin/Views/BetCard.swift @@ -8,6 +8,7 @@ import SwiftUI struct BetCard: View { + var body: some View { VStack(spacing: 0){ VStack(alignment: .leading,spacing: 2){ @@ -67,6 +68,7 @@ struct BetCard: View { .background(AllinColor.CapsuleGray).cornerRadius(20, corners: [.bottomLeft,.bottomRight]).padding(.bottom,0).border(width: 1, edges: [.top], color: AllinColor.DelimiterGray) } + } } diff --git a/Sources/allin/allin/Views/RecapBetCard.swift b/Sources/allin/allin/Views/RecapBetCard.swift new file mode 100644 index 0000000..e383c49 --- /dev/null +++ b/Sources/allin/allin/Views/RecapBetCard.swift @@ -0,0 +1,91 @@ +// +// RecapBetCard.swift +// AllIn +// +// Created by étudiant on 28/09/2023. +// + +import SwiftUI + +struct RecapBetCard: View { + @GestureState private var longPressTap = false + @State private var isPressed = false + var body: some View { + VStack(spacing: 0){ + VStack(alignment: .leading,spacing: 2){ + HStack{ + Spacer() + Text("proposé par Lucas").font(.system(size: 10)).foregroundColor(AllinColor.lightGray) + + } + Text("Etudes").font(.system(size: 15)).foregroundColor(AllinColor.lightGray) + Text("Emre va réussir son TP de CI/CD mercredi?").font(.system(size: 20)).fontWeight(.bold) + HStack{ + Text("Fini le ").font(.system(size: 15)).foregroundColor(AllinColor.lightGray) + TextCapsule() + TextCapsule() + Spacer() + + } + }.frame(width: .infinity).padding(.all,15) + + .background(AllinColor.BetCardBackground).cornerRadius(20, corners: [.topLeft,.topRight]).padding(.bottom,0) + VStack(alignment: .leading,spacing: 6){ + HStack{ + Text("Mise").font(.system(size: 15)).foregroundColor(AllinColor.lightGray).fontWeight(.regular) + Spacer() + Text("1630").font(.system(size: 15)).foregroundColor(AllinColor.lightGray).fontWeight(.regular) + Image("Allcoins").resizable().frame(width: 10,height: 10).overlay { + AllinColor.lightGray.frame(width: 10) + .mask( + Image("Allcoins").resizable().frame(width: 10,height: 10) + ) + } + + } + HStack{ + Text("Gains").font(.system(size: 15)).foregroundColor(AllinColor.PrimaryTextColor).fontWeight(.medium) + Spacer() + Text("1630").font(.system(size: 15)).fontWeight(.medium).overlay { + AllinColor.gradiantCard.frame(width: 50) + .mask( + Text("1630").font(.system(size: 15)).fontWeight(.medium) + ) + }.padding(0) + Image("Allcoins").resizable().frame(width: 10,height: 10).overlay { + AllinColor.gradiantCard.frame(width: 10) + .mask( + Image("Allcoins").resizable().frame(width: 10,height: 10) + ) + } + + } + HStack{ + Text("Côte totale").font(.system(size: 15)).fontWeight(.medium) + Spacer() + Text("3,46").font(.system(size: 18)).padding([.leading,.trailing],10).padding([.top,.bottom],5).foregroundColor(.white).fontWeight(.bold).background(AllinColor.gradiantCard).cornerRadius(8, corners: .allCorners) + + + }.padding([.bottom],10) + + + }.frame(width: .infinity).padding([.top,.bottom],8).padding([.leading,.trailing],15) + + .background(AllinColor.CapsuleGray).cornerRadius(20, corners: [.bottomLeft,.bottomRight]).padding(.bottom,0).border(width: 1, edges: [.top], color: AllinColor.DelimiterGray) + }.scaleEffect(longPressTap ? 0.97 : 1.0) + .animation(.easeInOut, value: longPressTap) + .gesture( + LongPressGesture(minimumDuration: 0.5) // Vous pouvez ajuster la durée à votre préférence + .updating($longPressTap) { value, state, _ in + state = value + } + ) + + } +} + +struct RecapBetCard_Previews: PreviewProvider { + static var previews: some View { + RecapBetCard() + } +}