Merge remote-tracking branch 'refs/remotes/origin/master'

Conflicts:
	Sources/allin/allin/ContentView.swift
	Sources/allin/allin/Ressources/Colors.swift
	Sources/allin/allin/Views/TopBarView.swift
Menu
lucas delanier 2 years ago
commit 2f80ff6690

@ -16,6 +16,8 @@
D98C4D7F2AB9D019007A6B4D /* AllInUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D98C4D7E2AB9D019007A6B4D /* AllInUITests.swift */; };
D98C4D812AB9D019007A6B4D /* AllInUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D98C4D802AB9D019007A6B4D /* AllInUITestsLaunchTests.swift */; };
D98C4D8E2AB9D440007A6B4D /* TopBarView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D98C4D8D2AB9D440007A6B4D /* TopBarView.swift */; };
EC46D7DD2ABCCC270030AC04 /* MenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC46D7DC2ABCCC270030AC04 /* MenuView.swift */; };
EC46D7DF2ABCE0A20030AC04 /* ParameterMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC46D7DE2ABCE0A20030AC04 /* ParameterMenuView.swift */; };
EC87FCD62ABBA24000363986 /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC87FCD52ABBA24000363986 /* Extensions.swift */; };
EC87FCD92ABBA60900363986 /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC87FCD82ABBA60900363986 /* Colors.swift */; };
EC87FCDB2ABBA6AC00363986 /* TrendingBetCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC87FCDA2ABBA6AC00363986 /* TrendingBetCard.swift */; };
@ -51,6 +53,8 @@
D98C4D7E2AB9D019007A6B4D /* AllInUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllInUITests.swift; sourceTree = "<group>"; };
D98C4D802AB9D019007A6B4D /* AllInUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllInUITestsLaunchTests.swift; sourceTree = "<group>"; };
D98C4D8D2AB9D440007A6B4D /* TopBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TopBarView.swift; sourceTree = "<group>"; };
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; };
EC87FCD52ABBA24000363986 /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Extensions.swift; path = allin/Extensions/Extensions.swift; sourceTree = SOURCE_ROOT; };
EC87FCD82ABBA60900363986 /* Colors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = Colors.swift; path = allin/Ressources/Colors.swift; sourceTree = SOURCE_ROOT; };
EC87FCDA2ABBA6AC00363986 /* TrendingBetCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = TrendingBetCard.swift; path = allin/Views/TrendingBetCard.swift; sourceTree = SOURCE_ROOT; };
@ -87,6 +91,8 @@
D98C4D8D2AB9D440007A6B4D /* TopBarView.swift */,
D92EC57B2ABADA2800CCD30E /* CoinCounterView.swift */,
EC87FCDA2ABBA6AC00363986 /* TrendingBetCard.swift */,
EC46D7DC2ABCCC270030AC04 /* MenuView.swift */,
EC46D7DE2ABCE0A20030AC04 /* ParameterMenuView.swift */,
);
path = Views;
sourceTree = "<group>";
@ -297,10 +303,12 @@
buildActionMask = 2147483647;
files = (
EC87FCD62ABBA24000363986 /* Extensions.swift in Sources */,
EC46D7DD2ABCCC270030AC04 /* MenuView.swift in Sources */,
EC87FCD92ABBA60900363986 /* Colors.swift in Sources */,
D98C4D662AB9D017007A6B4D /* ContentView.swift in Sources */,
D92EC57C2ABADA2800CCD30E /* CoinCounterView.swift in Sources */,
D98C4D8E2AB9D440007A6B4D /* TopBarView.swift in Sources */,
EC46D7DF2ABCE0A20030AC04 /* ParameterMenuView.swift in Sources */,
D98C4D642AB9D017007A6B4D /* AllInApp.swift in Sources */,
EC87FCDB2ABBA6AC00363986 /* TrendingBetCard.swift in Sources */,
);

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>SchemeUserState</key>
<dict>
<key>AllIn.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
</dict>
</dict>
</plist>

@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x39",
"green" : "0x39",
"red" : "0x39"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0x39",
"green" : "0x39",
"red" : "0x39"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "Eyes.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: 1.5 KiB

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "Woman And Man Holding Hands.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: 2.0 KiB

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "gear-solid 2.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: 1.4 KiB

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "Money With Wings.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: 1.9 KiB

@ -0,0 +1,21 @@
{
"images" : [
{
"filename" : "Video Game.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: 1.7 KiB

@ -8,15 +8,33 @@
import SwiftUI
struct ContentView: View {
@State var showMenu = false
var body: some View {
VStack(alignment: .center, spacing: 0) {
TopBarView()
ScrollView{
TrendingBetCard().padding(.top, 20)
}.background(AllinColor.backgroundWhite)
let drag = DragGesture()
.onEnded {
if $0.translation.width < -100 {
withAnimation{
self.showMenu = false
}
}
}
.edgesIgnoringSafeArea([.bottom])
.frame(alignment: .top)
GeometryReader { geometry in
ZStack(alignment: .leading) {
Home(showMenu: self.$showMenu)
.frame(width: geometry.size.width, height: geometry.size.height)
.offset(x: self.showMenu ? geometry.size.width/1.3:0)
if self.showMenu {
MenuView()
.frame(width: geometry.size.width*0.8)
.transition(.move(edge: .leading))
}
}
.gesture(drag)
}
}
}
@ -25,3 +43,16 @@ struct ContentView_Previews: PreviewProvider {
ContentView()
}
}
struct Home: View {
@Binding var showMenu: Bool
var body: some View {
VStack(alignment: .center) {
TopBarView(showMenu: self.$showMenu)
TrendingBetCard()}
.edgesIgnoringSafeArea(.top)
}
}

@ -12,6 +12,7 @@ struct AllinColor {
static let darkGray = Color("DarkGray")
static let darkerGray = Color("DarkerGray")
static let pinkAccentText = Color("PinkAccentText")
static let darkLight = Color("DarkLight")
static let backgroundWhite = Color("BackgroundWhite")
static let blueAccent = Color("BlueAccent")
static let gradiantCard = LinearGradient(

@ -0,0 +1,37 @@
//
// MenuView.swift
// AllIn
//
// Created by étudiant on 21/09/2023.
//
import SwiftUI
struct MenuView: View {
var body: some View {
VStack(alignment: .leading) {
ParameterMenuView(icon: "VideoGame", title: "CREER UN BET")
.padding(.top, 100)
ParameterMenuView(icon: "Eyes", title: "HISTORIQUE DES BETS")
.padding(.top, 30)
ParameterMenuView(icon: "Friends", title: "AMIS")
.padding(.top, 30)
ParameterMenuView(icon: "Money", title: "BET EN COURS")
.padding(.top, 30)
Spacer()
Image("GearIcon")
.resizable()
.frame(width: 30, height: 30)
.padding([.leading,.bottom], 20)
}
.frame(maxWidth: .infinity,alignment: .leading)
.background(AllinColor.darkerGray)
.edgesIgnoringSafeArea(.all)
}
}

@ -0,0 +1,26 @@
//
// ParameterMenuView.swift
// AllIn
//
// Created by étudiant on 21/09/2023.
//
import SwiftUI
struct ParameterMenuView: View {
var icon: String
var title: String
var body: some View {
HStack {
Image(icon)
Text(title)
.foregroundColor(.white)
.font(.headline)
Spacer()
}
.background(AllinColor.darkLight)
.cornerRadius(12)
}
}

@ -8,18 +8,23 @@
import SwiftUI
struct TopBarView: View {
@Binding var showMenu: Bool
var body: some View {
let TopBarColorPink = Color(red: 249/255, green: 81/255, blue: 168/255)
let TopBarColorBlue = Color(red: 25/255, green: 159/255, blue: 238/255)
let TopBarColorPurple = Color(red: 170/255, green: 126/255, blue: 243/255)
ZStack{
HStack{
Image("menu")
.resizable()
.frame(width: 26,height: 15)
Button(action: {withAnimation{ self.showMenu = !self.showMenu }}) {
Image("menu")
.resizable()
.frame(width: 26,height: 15)
.padding(.leading, 30)
}
Spacer()
CoinCounterView()
}
.frame(alignment: .top)
.padding(.leading, 20)
@ -31,7 +36,7 @@ struct TopBarView: View {
.padding([.bottom], 20)
.padding([.top], 10)
.background(LinearGradient(gradient:
Gradient(colors:[TopBarColorPink,TopBarColorPurple,TopBarColorBlue]),
Gradient(colors:[TopBarColorPink,TopBarColorPurple,TopBarColorBlue]),
startPoint: .bottomLeading, endPoint: .topTrailing))
}

Loading…
Cancel
Save