win page finished

bet_component
lucas delanier 2 years ago
parent 2b9ea15560
commit 48f21ad2e7

@ -21,6 +21,8 @@
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 */; };
@ -67,6 +69,8 @@
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; };
@ -114,6 +118,8 @@
EC2C1EEC2AC093820091D57C /* TextCapsule.swift */,
EC2C1EEE2AC098D30091D57C /* UsersPreview.swift */,
EC3737E32AC2F5FB00E6BDB5 /* ChoiceCapsule.swift */,
EC3737E72AC5A53B00E6BDB5 /* AllcoinsCapsule.swift */,
EC3737E92AC5A58B00E6BDB5 /* RecapBetCard.swift */,
);
path = Views;
sourceTree = "<group>";
@ -348,6 +354,8 @@
EC46D7DD2ABCCC270030AC04 /* MenuView.swift in Sources */,
EC2C1EEB2AC08BE80091D57C /* BetCard.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 */,

@ -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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

@ -25,18 +25,18 @@ struct Home: View {
BetCard()
BetCard()
BetCard()
Button("Show Sheet") {
showingSheet.toggle()
}
.sheet(isPresented: $showingSheet) {
WinModal()
}
}.padding([.leading,.trailing],25)
} header: {
ZStack{
AllinColor.fadeInGradiantCard
ScrollView(.horizontal,showsIndicators: false){
HStack{
Button("Show Sheet") {
showingSheet.toggle()
}
.sheet(isPresented: $showingSheet) {
WinModal()
}
ChoiceCapsule()
ChoiceCapsule()
ChoiceCapsule()

@ -8,11 +8,11 @@
import SwiftUI
struct WinModal: View {
@Environment(\.dismiss) var dismiss
@State var xOffset: CGFloat = 0
var body: some View {
ZStack{
Image("BackGradiant2").resizable()
ZStack{
GeometryReader { geometry in
let size = geometry.size.width / 20
@ -160,20 +160,32 @@ struct WinModal: View {
Spacer()
}
Image("Close_icon").resizable().frame(width: 25, height: 25)
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)
}
}
}.edgesIgnoringSafeArea(.all)
}.background(
Image("ModalBackground")
.resizable()
.edgesIgnoringSafeArea(.all)
.frame(width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height))
}
}
@ -214,7 +226,7 @@ struct InfiniteScroller<Content: View>: View {
withAnimation(.linear(duration: 25).repeatForever(autoreverses: false)) {
xOffset = +contentWidth
}
}.frame(width: 1000).rotationEffect(.degrees(-30)).opacity(0.04)
}.frame(width: 1200).rotationEffect(.degrees(-30)).opacity(0.04)
}
}

@ -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()
}
}

@ -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)
}
}
}

@ -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()
}
}
Loading…
Cancel
Save