diff --git a/Sources/allin/allin.xcodeproj/project.xcworkspace/xcuserdata/etudiant.xcuserdatad/UserInterfaceState.xcuserstate b/Sources/allin/allin.xcodeproj/project.xcworkspace/xcuserdata/etudiant.xcuserdatad/UserInterfaceState.xcuserstate index bcc7040..ac598ab 100644 Binary files a/Sources/allin/allin.xcodeproj/project.xcworkspace/xcuserdata/etudiant.xcuserdatad/UserInterfaceState.xcuserstate and b/Sources/allin/allin.xcodeproj/project.xcworkspace/xcuserdata/etudiant.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/Sources/allin/allin/Assets.xcassets/BorderColorMenu.colorset/Contents.json b/Sources/allin/allin/Assets.xcassets/BorderColorMenu.colorset/Contents.json new file mode 100644 index 0000000..cf9f629 --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/BorderColorMenu.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x45", + "green" : "0x45", + "red" : "0x45" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x45", + "green" : "0x45", + "red" : "0x45" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/allin/allin/Assets.xcassets/ChevronRightICon.imageset/Contents.json b/Sources/allin/allin/Assets.xcassets/ChevronRightICon.imageset/Contents.json new file mode 100644 index 0000000..88bb4a2 --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/ChevronRightICon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "chevron-left-solid (1) 1.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/ChevronRightICon.imageset/chevron-left-solid (1) 1.png b/Sources/allin/allin/Assets.xcassets/ChevronRightICon.imageset/chevron-left-solid (1) 1.png new file mode 100644 index 0000000..3451d58 Binary files /dev/null and b/Sources/allin/allin/Assets.xcassets/ChevronRightICon.imageset/chevron-left-solid (1) 1.png differ diff --git a/Sources/allin/allin/Assets.xcassets/DarkGray.colorset/Contents.json b/Sources/allin/allin/Assets.xcassets/DarkGray.colorset/Contents.json index 5414be4..20d2b1a 100644 --- a/Sources/allin/allin/Assets.xcassets/DarkGray.colorset/Contents.json +++ b/Sources/allin/allin/Assets.xcassets/DarkGray.colorset/Contents.json @@ -5,9 +5,9 @@ "color-space" : "srgb", "components" : { "alpha" : "1.000", - "blue" : "0.173", - "green" : "0.173", - "red" : "0.173" + "blue" : "0x2C", + "green" : "0x2C", + "red" : "0x2C" } }, "idiom" : "universal" diff --git a/Sources/allin/allin/Assets.xcassets/DescriptionColorMenu.colorset/Contents.json b/Sources/allin/allin/Assets.xcassets/DescriptionColorMenu.colorset/Contents.json new file mode 100644 index 0000000..cf4b210 --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/DescriptionColorMenu.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x89", + "green" : "0x89", + "red" : "0x89" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x89", + "green" : "0x89", + "red" : "0x89" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/allin/allin/ContentView.swift b/Sources/allin/allin/ContentView.swift index 50016ef..d1a2733 100644 --- a/Sources/allin/allin/ContentView.swift +++ b/Sources/allin/allin/ContentView.swift @@ -13,7 +13,7 @@ struct ContentView: View { var body: some View { - let drag = DragGesture() + let closeDrag = DragGesture() .onEnded { if $0.translation.width < -100 { withAnimation{ @@ -33,8 +33,7 @@ struct ContentView: View { .transition(.move(edge: .leading)) } } - .gesture(drag) - + .gesture(closeDrag) } } } diff --git a/Sources/allin/allin/Ressources/Colors.swift b/Sources/allin/allin/Ressources/Colors.swift index f631693..4380c38 100644 --- a/Sources/allin/allin/Ressources/Colors.swift +++ b/Sources/allin/allin/Ressources/Colors.swift @@ -18,6 +18,8 @@ struct AllinColor { static let TopBarColorPink = Color("TopBarColorPink") static let TopBarColorBlue = Color("TopBarColorBlue") static let TopBarColorPurple = Color("TopBarColorPurple") + static let DescriptionColorMenu = Color("DescriptionColorMenu") + static let BorderColorMenu = Color("BorderColorMenu") static let gradiantCard = LinearGradient( gradient: Gradient(colors: [AllinColor.pinkAccentText, AllinColor.blueAccent]), startPoint: .bottomLeading, diff --git a/Sources/allin/allin/Views/MenuView.swift b/Sources/allin/allin/Views/MenuView.swift index 9fbe7aa..9cdb5af 100644 --- a/Sources/allin/allin/Views/MenuView.swift +++ b/Sources/allin/allin/Views/MenuView.swift @@ -10,19 +10,20 @@ import SwiftUI struct MenuView: View { var body: some View { - VStack(alignment: .leading) { + VStack(alignment: .leading, spacing: 10) { - ParameterMenuView(icon: "VideoGame", title: "CREER UN BET") - .padding(.top, 100) + ParameterMenuView(icon: "VideoGame", title: "CREER UN BET", description: "Créez un nouveau BET et faites participer vos amis.") + .padding([.leading,.trailing], 13) - ParameterMenuView(icon: "Eyes", title: "HISTORIQUE DES BETS") - .padding(.top, 30) + ParameterMenuView(icon: "Eyes", title: "HISTORIQUE DES BETS", description: "Consultez vos paris en cours et terminés.") + .padding([.leading,.trailing], 13) - ParameterMenuView(icon: "Friends", title: "AMIS") - .padding(.top, 30) + ParameterMenuView(icon: "Friends", title: "AMIS", description: "Défiez vos porches en les ajoutant en amis.") + .padding([.leading,.trailing], 13) - ParameterMenuView(icon: "Money", title: "BET EN COURS") - .padding(.top, 30) + ParameterMenuView(icon: "Money", title: "BET EN COURS", description: "Gérez vos bets et récompensez les gagnants.") + .padding([.leading,.trailing], 13) + Spacer() Image("GearIcon") .resizable() diff --git a/Sources/allin/allin/Views/ParameterMenuView.swift b/Sources/allin/allin/Views/ParameterMenuView.swift index 96e5866..fb56b02 100644 --- a/Sources/allin/allin/Views/ParameterMenuView.swift +++ b/Sources/allin/allin/Views/ParameterMenuView.swift @@ -11,16 +11,30 @@ struct ParameterMenuView: View { var icon: String var title: String + var description: String var body: some View { HStack { Image(icon) - Text(title) - .foregroundColor(.white) - .font(.headline) + VStack(alignment: .leading){ + Text(title) + .betTextStyle(weight: .bold, color: .white, size: 13) + Text(description) + .betTextStyle(weight: .bold, color: AllinColor.DescriptionColorMenu, size: 9) + } Spacer() + Image("ChevronRightIcon") + .resizable() + .frame(width: 10, height: 18) } + .padding([.leading,.trailing], 10) + .padding([.top,.bottom], 15) .background(AllinColor.darkLight) - .cornerRadius(12) + .overlay( + RoundedRectangle(cornerRadius: 12, style: .continuous) + .stroke(AllinColor.BorderColorMenu, lineWidth: 3) + ) + .clipShape(RoundedRectangle(cornerRadius: 12, style: .continuous)) + } } diff --git a/Sources/allin/allin/Views/TrendingBetCard.swift b/Sources/allin/allin/Views/TrendingBetCard.swift index c1921c3..adcc5eb 100644 --- a/Sources/allin/allin/Views/TrendingBetCard.swift +++ b/Sources/allin/allin/Views/TrendingBetCard.swift @@ -71,7 +71,6 @@ struct TrendingBetCard: View { } .frame(height: 127, alignment: .topLeading) .background(AllinColor.darkerGray) - .overlay( RoundedRectangle(cornerRadius: 20, style: .continuous) .stroke(AllinColor.gradiantCard, lineWidth: 5)