Add FriendsPage and RankingPage

auth_manage
Emre KARTAL 2 years ago
parent 5c1db04218
commit deab2472dc

@ -29,6 +29,10 @@
EC87FCD92ABBA60900363986 /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC87FCD82ABBA60900363986 /* Colors.swift */; };
EC87FCDB2ABBA6AC00363986 /* TrendingBetCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC87FCDA2ABBA6AC00363986 /* TrendingBetCard.swift */; };
EC9A45B02ABDF4A800125D41 /* BetScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC9A45AF2ABDF4A800125D41 /* BetScreen.swift */; };
ECA701092AC3FE3300532444 /* RankingScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECA701082AC3FE3300532444 /* RankingScreen.swift */; };
ECA7010B2AC4003400532444 /* RankingRowView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECA7010A2AC4003400532444 /* RankingRowView.swift */; };
ECA7010D2AC4948600532444 /* FriendsScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECA7010C2AC4948600532444 /* FriendsScreen.swift */; };
ECA7010F2AC4949D00532444 /* FriendView.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECA7010E2AC4949D00532444 /* FriendView.swift */; };
ECDF624A2AC1CAFD00BA8213 /* RegisterScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECDF62492AC1CAFD00BA8213 /* RegisterScreen.swift */; };
ECFC54442AC0C39E00195760 /* LoginScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECFC54432AC0C39E00195760 /* LoginScreen.swift */; };
/* End PBXBuildFile section */
@ -77,6 +81,10 @@
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; };
EC9A45AF2ABDF4A800125D41 /* BetScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = BetScreen.swift; path = allin/Screens/BetScreen.swift; sourceTree = SOURCE_ROOT; };
ECA701082AC3FE3300532444 /* RankingScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = RankingScreen.swift; path = allin/Screens/RankingScreen.swift; sourceTree = SOURCE_ROOT; };
ECA7010A2AC4003400532444 /* RankingRowView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = RankingRowView.swift; path = allin/Views/RankingRowView.swift; sourceTree = SOURCE_ROOT; };
ECA7010C2AC4948600532444 /* FriendsScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = FriendsScreen.swift; path = allin/Screens/FriendsScreen.swift; sourceTree = SOURCE_ROOT; };
ECA7010E2AC4949D00532444 /* FriendView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = FriendView.swift; path = allin/Views/FriendView.swift; sourceTree = SOURCE_ROOT; };
ECDF62492AC1CAFD00BA8213 /* RegisterScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = RegisterScreen.swift; path = allin/Screens/RegisterScreen.swift; sourceTree = SOURCE_ROOT; };
ECFC54432AC0C39E00195760 /* LoginScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = LoginScreen.swift; path = allin/Screens/LoginScreen.swift; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
@ -118,6 +126,8 @@
EC2C1EEC2AC093820091D57C /* TextCapsule.swift */,
EC2C1EEE2AC098D30091D57C /* UsersPreview.swift */,
EC3737E32AC2F5FB00E6BDB5 /* ChoiceCapsule.swift */,
ECA7010A2AC4003400532444 /* RankingRowView.swift */,
ECA7010E2AC4949D00532444 /* FriendView.swift */,
);
path = Views;
sourceTree = "<group>";
@ -208,6 +218,8 @@
ECFC54432AC0C39E00195760 /* LoginScreen.swift */,
ECDF62492AC1CAFD00BA8213 /* RegisterScreen.swift */,
EC8601F42AC37919004262C8 /* HomeScreen.swift */,
ECA701082AC3FE3300532444 /* RankingScreen.swift */,
ECA7010C2AC4948600532444 /* FriendsScreen.swift */,
);
path = Screens;
sourceTree = "<group>";
@ -350,10 +362,13 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
ECA7010B2AC4003400532444 /* RankingRowView.swift in Sources */,
ECA701092AC3FE3300532444 /* RankingScreen.swift in Sources */,
ECFC54442AC0C39E00195760 /* LoginScreen.swift in Sources */,
EC87FCD62ABBA24000363986 /* Extensions.swift in Sources */,
EC46D7DD2ABCCC270030AC04 /* MenuView.swift in Sources */,
EC2C1EEB2AC08BE80091D57C /* BetCard.swift in Sources */,
ECA7010F2AC4949D00532444 /* FriendView.swift in Sources */,
EC87FCD92ABBA60900363986 /* Colors.swift in Sources */,
D98C4D662AB9D017007A6B4D /* ContentView.swift in Sources */,
D92EC57C2ABADA2800CCD30E /* CoinCounterView.swift in Sources */,
@ -365,6 +380,7 @@
EC46D7DF2ABCE0A20030AC04 /* ParameterMenuView.swift in Sources */,
ECDF624A2AC1CAFD00BA8213 /* RegisterScreen.swift in Sources */,
EC50BF982ABF541B00197685 /* WelcomeScreen.swift in Sources */,
ECA7010D2AC4948600532444 /* FriendsScreen.swift in Sources */,
EC8601F52AC37919004262C8 /* HomeScreen.swift in Sources */,
D98C4D642AB9D017007A6B4D /* AllInApp.swift in Sources */,
EC2C1EEF2AC098D30091D57C /* UsersPreview.swift in Sources */,

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

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

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

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

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

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

@ -13,17 +13,23 @@ struct AllinColor {
static let darkerGray = Color("DarkerGray")
static let pinkAccentText = Color("PinkAccentText")
static let darkLight = Color("DarkLight")
static let titleColor = Color("TitleColor")
static let backgroundWhite = Color("BackgroundWhite")
static let PurpleText = Color("PurpleText")
static let StartBackground = Color("StartBackground")
static let blueAccent = Color("BlueAccent")
static let TopBarColorPink = Color("TopBarColorPink")
static let VeryLightGray = Color("VeryLightGray")
static let StartTextColor = Color("StartTextColor")
static let LightPurple = Color("LightPurple")
static let TopBarColorBlue = Color("TopBarColorBlue")
static let TopBarColorPurple = Color("TopBarColorPurple")
static let StrokeGrayColor = Color("StrokeGrayColor")
static let RankingRowBackground = Color("RankingRowBackground")
static let DescriptionColorMenu = Color("DescriptionColorMenu")
static let DeleteButtonColor = Color("DeleteButtonColor")
static let Gray_400 = Color("Gray_400")
static let Gray_100 = Color("Gray_100")
static let lightGray = Color("LightGray")
static let BorderColorMenu = Color("BorderColorMenu")
static let PrimaryTextColor = Color("PrimaryTextColor")

@ -0,0 +1,30 @@
//
// FriendsScreen.swift
// AllIn
//
// Created by étudiant on 27/09/2023.
//
import SwiftUI
struct Friends: View {
@Binding var showMenu: Bool
var body: some View {
VStack(alignment: .center, spacing: 0) {
TopBarView(showMenu: self.$showMenu)
Text("Amis")
.betTextStyle(weight: .bold, color: AllinColor.titleColor, size: 25)
.padding([.top,.bottom],15)
ScrollView(showsIndicators: false){
Friend(image: "https://picsum.photos/536/354", pseudo: "Lucas")
Friend(image: "https://picsum.photos/536/354", pseudo: "Arthur")
Friend(image: "https://picsum.photos/536/354", pseudo: "Lucase")
Friend(image: "https://picsum.photos/536/354", pseudo: "Rayhan")
}.padding(.top, 25)
Spacer()
}
.edgesIgnoringSafeArea(.bottom).background(AllinColor.backgroundWhite)
}
}

@ -38,11 +38,16 @@ struct Home: View {
case "Bet":
Bet(showMenu: self.$showMenu)
case "Ranking":
Ranking(showMenu: self.$showMenu)
case "Friends":
Friends(showMenu: self.$showMenu)
default:
Bet(showMenu: self.$showMenu)
}
}
Bet(showMenu: self.$showMenu)
.frame(width: geometry.size.width, height: geometry.size.height)
.offset(x: self.showMenu ? geometry.size.width/1.21:0)
.gesture(openDrag)

@ -0,0 +1,128 @@
//
// RankingScreen.swift
// AllIn
//
// Created by étudiant on 27/09/2023.
//
import SwiftUI
struct Ranking: View {
@Binding var showMenu: Bool
var body: some View {
VStack(alignment: .center, spacing: 0) {
TopBarView(showMenu: self.$showMenu)
Text("Classement")
.betTextStyle(weight: .bold, color: AllinColor.titleColor, size: 25)
.padding([.top,.bottom],15)
HStack {
ZStack {
VStack(spacing: 0){
Spacer()
Text("Pseudo")
.fontWeight(.bold)
.padding(.bottom, 4)
.font(.system(size: 18))
.lineLimit(1)
Divider()
.background(AllinColor.Gray_100)
HStack{
Spacer()
Image("AllCoinsIcon")
.resizable()
.frame(width: 18, height: 18, alignment: .leading)
.padding([.top,.bottom],10)
Text(String("570"))
.betTextStyle(weight: .black, color: AllinColor.PrimaryTextColor, size: 16)
.padding(.trailing, 18)
Spacer()
}
.frame(width: 167)
.background(AllinColor.VeryLightGray)
}
.frame(width: 167, height: 110)
.background(AllinColor.RankingRowBackground)
.cornerRadius(41.5, corners: .topLeft)
.cornerRadius(8, corners: .topRight)
.cornerRadius(15, corners: [.bottomLeft, .bottomRight])
Image("DefaultUserIcon")
.resizable()
.frame(width: 70, height: 70)
.scaledToFit()
.cornerRadius(180)
.offset(x: 0, y: -55)
Text("1")
.frame(width: 28, height: 28)
.foregroundColor(.white)
.background(AllinColor.PrimaryTextColor)
.cornerRadius(30)
.font(.system(size: 18))
.fontWeight(.bold)
.offset(x: 0, y: -23)
}
Spacer()
ZStack {
VStack(spacing: 0){
Spacer()
Text("Pseudo")
.fontWeight(.bold)
.padding(.bottom, 4)
.font(.system(size: 16))
.lineLimit(1)
Divider()
.background(AllinColor.Gray_100)
HStack{
Spacer()
Image("AllCoinsIcon")
.resizable()
.frame(width: 18, height: 18, alignment: .leading)
.padding([.top,.bottom],10)
Text(String("570"))
.betTextStyle(weight: .black, color: AllinColor.PrimaryTextColor, size: 16)
.padding(.trailing, 18)
Spacer()
}
.frame(width: 167)
.background(AllinColor.VeryLightGray)
}
.frame(width: 167, height: 95)
.background(AllinColor.RankingRowBackground)
.cornerRadius(27.5, corners: .topRight)
.cornerRadius(8, corners: .topLeft)
.cornerRadius(15, corners: [.bottomLeft, .bottomRight])
Image("DefaultUserIcon")
.resizable()
.frame(width: 60, height: 60)
.scaledToFit()
.cornerRadius(180)
.offset(x: 0, y: -50)
Text("2")
.frame(width: 23, height: 23)
.foregroundColor(.white)
.background(AllinColor.PrimaryTextColor)
.cornerRadius(30)
.font(.system(size: 15))
.fontWeight(.bold)
.offset(x: 0, y: -22)
}
.padding(.top, 10)
}
.padding([.leading,.trailing,.top],20)
ScrollView(showsIndicators: false){
RankingRowView(number: 3, image: "DefaultUserIcon", pseudo: "Lucas", allCoins: 541)
RankingRowView(number: 4, image: "DefaultUserIcon", pseudo: "Arthur", allCoins: 542)
}.padding(.top, 15)
Spacer()
}
.edgesIgnoringSafeArea(.bottom).background(AllinColor.backgroundWhite)
}
}

@ -0,0 +1,36 @@
//
// FriendView.swift
// AllIn
//
// Created by étudiant on 27/09/2023.
//
import SwiftUI
struct Friend: View {
var image: String
var pseudo: String
var body: some View {
HStack{
AsyncImage(url: URL(string: image))
.frame(width: 50, height: 50)
.cornerRadius(180)
.scaledToFit()
Text(pseudo)
.fontWeight(.medium)
.padding(.leading, 5)
.font(.system(size: 18))
.lineLimit(1)
Spacer()
Button("Supprimer") {}
.frame(width: 90, height: 30)
.foregroundColor(AllinColor.Gray_400)
.font(.system(size: 14))
.background(AllinColor.DeleteButtonColor)
.cornerRadius(5)
}
.padding([.trailing,.leading], 25)
}
}

@ -18,11 +18,17 @@ struct MenuView: View {
.padding([.leading,.trailing], 13)
}
NavigationLink(destination: Home(page: "Ranking").navigationBarBackButtonHidden(true))
{
ParameterMenuView(icon: "Eyes", title: "HISTORIQUE DES BETS", description: "Consultez vos paris en cours et terminés.")
.padding([.leading,.trailing], 13)
}
NavigationLink(destination: Home(page: "Friends").navigationBarBackButtonHidden(true))
{
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", description: "Gérez vos bets et récompensez les gagnants.")
.padding([.leading,.trailing], 13)

@ -0,0 +1,45 @@
//
// RankingRowView.swift
// AllIn
//
// Created by étudiant on 27/09/2023.
//
import SwiftUI
struct RankingRowView: View {
var number: Int
var image: String
var pseudo: String
var allCoins: Int
var body: some View {
HStack(){
Text(String(number))
.padding(.leading, 15)
.betTextStyle(weight: .bold, color: AllinColor.PrimaryTextColor, size: 18)
Image(image)
.resizable()
.scaledToFit()
.frame(width: 40, height: 40)
.cornerRadius(180)
.padding([.bottom,.top], 10)
Text(pseudo)
.fontWeight(.medium)
.font(.system(size: 16))
.lineLimit(1)
Spacer()
Image("AllCoinsIcon")
.resizable()
.frame(width: 17, height: 17, alignment: .leading)
Text(String(allCoins))
.betTextStyle(weight: .black, color: AllinColor.PrimaryTextColor, size: 16)
.padding(.trailing, 15)
}
.background(AllinColor.RankingRowBackground)
.cornerRadius(8)
.padding([.leading,.trailing],20)
}
}
Loading…
Cancel
Save