From 0b8d7039bed0b772a0b6bfaf3ee83bd7d97d87ee Mon Sep 17 00:00:00 2001 From: "emre.kartal" Date: Wed, 4 Oct 2023 09:48:31 +0200 Subject: [PATCH] Questions part of the page creation bet done :white_check_mark: --- Sources/allin/allin.xcodeproj/project.pbxproj | 8 + .../Contents.json | 38 ++++ .../PurpleLight.colorset/Contents.json | 38 ++++ .../Contents.json | 38 ++++ .../Contents.json | 21 ++ .../circle-question-regular.png | Bin 0 -> 3013 bytes Sources/allin/allin/ContentView.swift | 2 +- Sources/allin/allin/Ressources/Colors.swift | 3 + .../allin/Screens/CreationBetScreen.swift | 213 ++++++++++++++++++ Sources/allin/allin/Screens/HomeScreen.swift | 3 + .../allin/Views/ConfidentialityView.swift | 32 +++ Sources/allin/allin/Views/MenuView.swift | 7 +- 12 files changed, 400 insertions(+), 3 deletions(-) create mode 100644 Sources/allin/allin/Assets.xcassets/PlaceholderGrayColor.colorset/Contents.json create mode 100644 Sources/allin/allin/Assets.xcassets/PurpleLight.colorset/Contents.json create mode 100644 Sources/allin/allin/Assets.xcassets/TitleCreationBetColor.colorset/Contents.json create mode 100644 Sources/allin/allin/Assets.xcassets/circle-question-regular.imageset/Contents.json create mode 100644 Sources/allin/allin/Assets.xcassets/circle-question-regular.imageset/circle-question-regular.png create mode 100644 Sources/allin/allin/Screens/CreationBetScreen.swift create mode 100644 Sources/allin/allin/Views/ConfidentialityView.swift diff --git a/Sources/allin/allin.xcodeproj/project.pbxproj b/Sources/allin/allin.xcodeproj/project.pbxproj index 78d7258..f526a57 100644 --- a/Sources/allin/allin.xcodeproj/project.pbxproj +++ b/Sources/allin/allin.xcodeproj/project.pbxproj @@ -16,9 +16,11 @@ 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 */; }; + EC000A7B2AC7450200A8BE26 /* CreationBetScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC000A7A2AC7450200A8BE26 /* CreationBetScreen.swift */; }; EC2C1EEB2AC08BE80091D57C /* BetCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC2C1EEA2AC08BE80091D57C /* BetCard.swift */; }; EC2C1EED2AC093820091D57C /* TextCapsule.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC2C1EEC2AC093820091D57C /* TextCapsule.swift */; }; EC2C1EEF2AC098D30091D57C /* UsersPreview.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC2C1EEE2AC098D30091D57C /* UsersPreview.swift */; }; + EC31955E2ACD3B8E00D0A4DC /* ConfidentialityView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC31955D2ACD3B8E00D0A4DC /* ConfidentialityView.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 */; }; @@ -70,10 +72,12 @@ D98C4D7E2AB9D019007A6B4D /* AllInUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllInUITests.swift; sourceTree = ""; }; D98C4D802AB9D019007A6B4D /* AllInUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllInUITestsLaunchTests.swift; sourceTree = ""; }; D98C4D8D2AB9D440007A6B4D /* TopBarView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TopBarView.swift; sourceTree = ""; }; + EC000A7A2AC7450200A8BE26 /* CreationBetScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = CreationBetScreen.swift; path = allin/Screens/CreationBetScreen.swift; sourceTree = SOURCE_ROOT; }; EC0EA7AF2ABDAAD1006BA4A0 /* PlusJakartaSans.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = PlusJakartaSans.ttf; sourceTree = ""; }; EC2C1EEA2AC08BE80091D57C /* BetCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = BetCard.swift; path = allin/Views/BetCard.swift; sourceTree = SOURCE_ROOT; }; 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; }; + EC31955D2ACD3B8E00D0A4DC /* ConfidentialityView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = ConfidentialityView.swift; path = allin/Views/ConfidentialityView.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; }; @@ -136,6 +140,7 @@ ECA7010E2AC4949D00532444 /* FriendView.swift */, EC3737E72AC5A53B00E6BDB5 /* AllcoinsCapsule.swift */, EC3737E92AC5A58B00E6BDB5 /* RecapBetCard.swift */, + EC31955D2ACD3B8E00D0A4DC /* ConfidentialityView.swift */, ); path = Views; sourceTree = ""; @@ -229,6 +234,7 @@ ECA701082AC3FE3300532444 /* RankingScreen.swift */, ECA7010C2AC4948600532444 /* FriendsScreen.swift */, EC3737E52AC41DB000E6BDB5 /* WinModal.swift */, + EC000A7A2AC7450200A8BE26 /* CreationBetScreen.swift */, ); path = Screens; sourceTree = ""; @@ -372,6 +378,7 @@ buildActionMask = 2147483647; files = ( ECA7010B2AC4003400532444 /* RankingRowView.swift in Sources */, + EC31955E2ACD3B8E00D0A4DC /* ConfidentialityView.swift in Sources */, ECA701092AC3FE3300532444 /* RankingScreen.swift in Sources */, ECFC54442AC0C39E00195760 /* LoginScreen.swift in Sources */, EC87FCD62ABBA24000363986 /* Extensions.swift in Sources */, @@ -397,6 +404,7 @@ D98C4D642AB9D017007A6B4D /* AllInApp.swift in Sources */, EC2C1EEF2AC098D30091D57C /* UsersPreview.swift in Sources */, EC87FCDB2ABBA6AC00363986 /* TrendingBetCard.swift in Sources */, + EC000A7B2AC7450200A8BE26 /* CreationBetScreen.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/Sources/allin/allin/Assets.xcassets/PlaceholderGrayColor.colorset/Contents.json b/Sources/allin/allin/Assets.xcassets/PlaceholderGrayColor.colorset/Contents.json new file mode 100644 index 0000000..6b527a7 --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/PlaceholderGrayColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xCB", + "green" : "0xCB", + "red" : "0xCB" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xCB", + "green" : "0xCB", + "red" : "0xCB" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/allin/allin/Assets.xcassets/PurpleLight.colorset/Contents.json b/Sources/allin/allin/Assets.xcassets/PurpleLight.colorset/Contents.json new file mode 100644 index 0000000..7388cc5 --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/PurpleLight.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xB5", + "red" : "0xB7" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xB5", + "red" : "0xB7" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/allin/allin/Assets.xcassets/TitleCreationBetColor.colorset/Contents.json b/Sources/allin/allin/Assets.xcassets/TitleCreationBetColor.colorset/Contents.json new file mode 100644 index 0000000..d1f70bd --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/TitleCreationBetColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x49", + "green" : "0x49", + "red" : "0x49" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFF", + "green" : "0xFF", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/allin/allin/Assets.xcassets/circle-question-regular.imageset/Contents.json b/Sources/allin/allin/Assets.xcassets/circle-question-regular.imageset/Contents.json new file mode 100644 index 0000000..5f326db --- /dev/null +++ b/Sources/allin/allin/Assets.xcassets/circle-question-regular.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "circle-question-regular.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/circle-question-regular.imageset/circle-question-regular.png b/Sources/allin/allin/Assets.xcassets/circle-question-regular.imageset/circle-question-regular.png new file mode 100644 index 0000000000000000000000000000000000000000..c8b22bc588126d579fb79db06aa9879f8db971f3 GIT binary patch literal 3013 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 = { + let calendar = Calendar.current + let startDate = Date() + let endDate = calendar.date(byAdding: .year, value: 10, to: startDate)! + return startDate ... endDate + }() + + var body: some View { + VStack(alignment: .center, spacing: 0) { + TopBarView(showMenu: self.$showMenu) + TabView { + ScrollView(showsIndicators: false) { + VStack(alignment: .leading, spacing: 5) { + VStack() { + HStack(spacing: 5) { + Text("Thème") + .font(.system(size: 17)) + .fontWeight(.bold) + .foregroundColor(AllinColor.TitleCreationBetColor) + Image("circle-question-regular") + .resizable() + .frame(width: 14, height: 14) + Spacer() + } + .padding(.leading, 10) + TextField("", text: $theme, prompt: Text("Études, sport, soirée...").foregroundColor(AllinColor.PlaceholderGrayColor).font(.system(size: 14)).fontWeight(.light)) + .padding() + .background( + RoundedRectangle(cornerRadius: 9) + .fill(Color.white) + .frame(height: 40) + ) + .frame(width: 350, height: 40) + .foregroundColor(.black) + .overlay( + RoundedRectangle(cornerRadius: 10, style: .continuous) + .stroke(AllinColor.LightGray_200, lineWidth: 1) + ) + .padding(.bottom, 5) + } + + HStack(spacing: 5) { + Text("Phrase du BET") + .font(.system(size: 17)) + .fontWeight(.bold) + .foregroundColor(AllinColor.TitleCreationBetColor) + Image("circle-question-regular") + .resizable() + .frame(width: 14, height: 14) + Spacer() + } + .padding(.leading, 10) + TextField("", text: $description, prompt: Text("Études, sport, soirée...").foregroundColor(AllinColor.PlaceholderGrayColor).font(.system(size: 14)).fontWeight(.light), axis: .vertical) + .lineLimit(4, reservesSpace: true) + .padding() + .background( + RoundedRectangle(cornerRadius: 9) + .fill(Color.white) + .frame(height: 110) + ) + .frame(width: 350, height: 110) + .foregroundColor(.black) + .overlay( + RoundedRectangle(cornerRadius: 10, style: .continuous) + .stroke(AllinColor.LightGray_200, lineWidth: 1) + ) + .padding(.bottom, 30) + + HStack(spacing: 5) { + Text("Date de fin des inscriptions") + .font(.system(size: 17)) + .fontWeight(.bold) + .foregroundColor(AllinColor.TitleCreationBetColor) + Image("circle-question-regular") + .resizable() + .frame(width: 14, height: 14) + Spacer() + } + .padding(.leading, 10) + DatePicker( + "", + selection: $startDate, + in: dateRange, + displayedComponents: [.date, .hourAndMinute] + ) + .accentColor(AllinColor.PrimaryTextColor) + .labelsHidden() + .padding(.bottom, 10) + VStack() { + HStack(spacing: 5) { + Text("Date de fin du BET") + .font(.system(size: 17)) + .fontWeight(.bold) + .foregroundColor(AllinColor.TitleCreationBetColor) + Image("circle-question-regular") + .resizable() + .frame(width: 14, height: 14) + Spacer() + } + .padding(.leading, 10) + HStack() { + DatePicker( + "", + selection: $endDate, + in: dateRange, + displayedComponents: [.date, .hourAndMinute] + ) + .accentColor(AllinColor.PrimaryTextColor) + .labelsHidden() + Spacer() + } + } + .padding(.bottom, 40) + VStack { + HStack(spacing: 5) { + Text("Confidentialité du BET") + .font(.system(size: 17)) + .fontWeight(.bold) + .foregroundColor(AllinColor.TitleCreationBetColor) + Image("circle-question-regular") + .resizable() + .frame(width: 14, height: 14) + Spacer() + } + .padding(.leading, 10) + HStack(spacing: 5) { + ConfidentialityView(image: "globe", text: "Public", selected: selectedConfidentiality) + .onTapGesture { + selectedConfidentiality = true + } + .padding(.trailing, 5) + ConfidentialityView(image: "lock", text: "Privé", selected: !selectedConfidentiality) + .onTapGesture { + selectedConfidentiality = false + } + Spacer() + } + } + .padding(.bottom, 10) + VStack(spacing: 10) { + Text("Votre BET sera visible par tous les utilisateurs.") + .font(.system(size: 13)) + .fontWeight(.bold) + .padding(.leading, 35) + .foregroundColor(AllinColor.PurpleLight) + .multilineTextAlignment(.center) + Text("Tout le monde pourra rejoindre le BET.") + .font(.system(size: 13)) + .fontWeight(.bold) + .padding(.leading, 35) + .foregroundColor(AllinColor.PurpleLight) + .multilineTextAlignment(.center) + Text("Vous pourrez inviter des amis à tout moment pendant la période d’inscription.") + .font(.system(size: 13)) + .padding(.leading, 35) + .fontWeight(.bold) + .foregroundColor(AllinColor.PurpleLight) + .multilineTextAlignment(.center) + + } + Spacer() + HStack() { + Spacer() + Button(action: {}) { + Text("Publier le bet") + .font(.system(size: 24)) + .fontWeight(.bold) + .foregroundColor(.purple) + .overlay { + AllinColor.gradiantCard.frame(width: 150) + .mask( + Text("Publier le bet") + .font(.system(size: 24)) + .fontWeight(.bold) + .frame(maxWidth: .infinity) + ) + } + } + .frame(width: 335, height: 60) + .background(.white) + .cornerRadius(12) + Spacer() + } + } + .padding([.leading,.trailing, .top, .bottom], 30) + } + + Text("Hello") + } + .tabViewStyle(PageTabViewStyle()) + Spacer() + } + .edgesIgnoringSafeArea(.bottom).background(AllinColor.backgroundWhite) + } +} diff --git a/Sources/allin/allin/Screens/HomeScreen.swift b/Sources/allin/allin/Screens/HomeScreen.swift index b3cb6c7..a7733a3 100644 --- a/Sources/allin/allin/Screens/HomeScreen.swift +++ b/Sources/allin/allin/Screens/HomeScreen.swift @@ -44,6 +44,9 @@ struct Home: View { case "Friends": Friends(showMenu: self.$showMenu) + case "CreationBet": + CreationBet(showMenu: self.$showMenu) + default: Bet(showMenu: self.$showMenu) } diff --git a/Sources/allin/allin/Views/ConfidentialityView.swift b/Sources/allin/allin/Views/ConfidentialityView.swift new file mode 100644 index 0000000..e0c2d3f --- /dev/null +++ b/Sources/allin/allin/Views/ConfidentialityView.swift @@ -0,0 +1,32 @@ +// +// ConfidentialityView.swift +// AllIn +// +// Created by étudiant on 04/10/2023. +// + +import SwiftUI + +struct ConfidentialityView: View { + + var image: String + var text: String + var selected: Bool + + var body: some View { + HStack() { + Image(systemName: image) + .resizable() + .frame(width: 18, height: 18) + .foregroundColor(selected ? .white : AllinColor.PrimaryTextColor) + + Text(text) + .font(.system(size: 17)) + .fontWeight(.bold) + .foregroundColor(selected ? .white : AllinColor.PrimaryTextColor) + } + .frame(width: 110, height: 45) + .background(selected ? AllinColor.PrimaryTextColor : .white) + .cornerRadius(10) + } +} diff --git a/Sources/allin/allin/Views/MenuView.swift b/Sources/allin/allin/Views/MenuView.swift index 56b394a..1c2d7f0 100644 --- a/Sources/allin/allin/Views/MenuView.swift +++ b/Sources/allin/allin/Views/MenuView.swift @@ -83,8 +83,11 @@ struct MenuView: View { .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) + NavigationLink(destination: Home(page: "CreationBet").navigationBarBackButtonHidden(true)) + { + ParameterMenuView(icon: "Money", title: "BET EN COURS", description: "Gérez vos bets et récompensez les gagnants.") + .padding([.leading,.trailing], 13) + } Spacer() Image("GearIcon")