From a16e003236e2070081040b1410e892099cd7bbd8 Mon Sep 17 00:00:00 2001 From: "emre.kartal" Date: Mon, 25 Sep 2023 16:12:38 +0200 Subject: [PATCH] Add RegisterPage :white_check_mark: --- Sources/allin/allin.xcodeproj/project.pbxproj | 4 + .../allin/allin/Screens/RegisterScreen.swift | 96 +++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 Sources/allin/allin/Screens/RegisterScreen.swift diff --git a/Sources/allin/allin.xcodeproj/project.pbxproj b/Sources/allin/allin.xcodeproj/project.pbxproj index 0850035..c983f53 100644 --- a/Sources/allin/allin.xcodeproj/project.pbxproj +++ b/Sources/allin/allin.xcodeproj/project.pbxproj @@ -24,6 +24,7 @@ EC87FCD92ABBA60900363986 /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC87FCD82ABBA60900363986 /* Colors.swift */; }; EC87FCDB2ABBA6AC00363986 /* TrendingBetCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC87FCDA2ABBA6AC00363986 /* TrendingBetCard.swift */; }; EC9A45B02ABDF4A800125D41 /* HomeScreen.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC9A45AF2ABDF4A800125D41 /* HomeScreen.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 */ @@ -66,6 +67,7 @@ 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 /* HomeScreen.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = HomeScreen.swift; path = allin/Screens/HomeScreen.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 */ @@ -190,6 +192,7 @@ EC50BF952ABF4D3300197685 /* SplashScreen.swift */, EC50BF972ABF541B00197685 /* WelcomeScreen.swift */, ECFC54432AC0C39E00195760 /* LoginScreen.swift */, + ECDF62492AC1CAFD00BA8213 /* RegisterScreen.swift */, ); path = Screens; sourceTree = ""; @@ -342,6 +345,7 @@ EC50BF962ABF4D3300197685 /* SplashScreen.swift in Sources */, EC9A45B02ABDF4A800125D41 /* HomeScreen.swift in Sources */, EC46D7DF2ABCE0A20030AC04 /* ParameterMenuView.swift in Sources */, + ECDF624A2AC1CAFD00BA8213 /* RegisterScreen.swift in Sources */, EC50BF982ABF541B00197685 /* WelcomeScreen.swift in Sources */, D98C4D642AB9D017007A6B4D /* AllInApp.swift in Sources */, EC87FCDB2ABBA6AC00363986 /* TrendingBetCard.swift in Sources */, diff --git a/Sources/allin/allin/Screens/RegisterScreen.swift b/Sources/allin/allin/Screens/RegisterScreen.swift new file mode 100644 index 0000000..9e75bbf --- /dev/null +++ b/Sources/allin/allin/Screens/RegisterScreen.swift @@ -0,0 +1,96 @@ +// +// RegisterScreen.swift +// AllIn +// +// Created by étudiant on 25/09/2023. +// + +import SwiftUI + +struct Register: View { + + @State private var pseudo: String = "" + @State private var username: String = "" + @State private var password: String = "" + @State private var passwordConfirm: String = "" + var body: some View { + GeometryReader { geometry in + VStack(spacing: 15) { + Spacer() + Text("On a besoin de ça!") + .betTextStyle(weight: .semibold, color: AllinColor.StartTextColor, size: 40) + Text("Promis c’est rapide.") + .frame(width: 220) + .multilineTextAlignment(.center) + .betTextStyle(weight: .regular, color: AllinColor.StartTextColor, size: 20) + .padding(.bottom, 60) + + TextField("", text: $pseudo, prompt: Text("Pseudo").foregroundColor(.gray)) + .padding() + .background(Color.white.cornerRadius(9)) + .frame(width: 300) + .foregroundColor(.black) + .overlay( + RoundedRectangle(cornerRadius: 9, style: .continuous) + .stroke(AllinColor.StrokeGrayColor, lineWidth: 1) + ) + .padding(.bottom, 8) + + TextField("", text: $username, prompt: Text("Email").foregroundColor(.gray)) + .padding() + .background(Color.white.cornerRadius(9)) + .frame(width: 300) + .foregroundColor(.black) + .overlay( + RoundedRectangle(cornerRadius: 9, style: .continuous) + .stroke(AllinColor.StrokeGrayColor, lineWidth: 1) + ) + .padding(.bottom, 8) + + TextField("", text: $password, prompt: Text("Mot de passe").foregroundColor(.gray)) + .padding() + .background(Color.white.cornerRadius(9)) + .frame(width: 300) + .overlay( + RoundedRectangle(cornerRadius: 9, style: .continuous) + .stroke(AllinColor.StrokeGrayColor, lineWidth: 1) + ) + .foregroundColor(.black) + .padding(.bottom, 8) + + TextField("", text: $passwordConfirm, prompt: Text("Confirmation du Mot de passe").foregroundColor(.gray)) + .padding() + .background(Color.white.cornerRadius(9)) + .frame(width: 300) + .overlay( + RoundedRectangle(cornerRadius: 9, style: .continuous) + .stroke(AllinColor.StrokeGrayColor, lineWidth: 1) + ) + .foregroundColor(.black) + .padding(.bottom, 50) + + Button(action: {}) { + Text("S'inscrire") + .betTextStyle(weight: .bold, color: .white, size: 17) + } + .frame(width: 300, height: 60) + .background(LinearGradient(gradient: + Gradient(colors:[AllinColor.TopBarColorPink,AllinColor.TopBarColorPurple,AllinColor.TopBarColorBlue]), + startPoint: .leading, endPoint: .trailing)) + .cornerRadius(13) + + Spacer() + HStack(spacing: 0) { + Text("Tu as déjà un compte? ") + .betTextStyle(weight: .regular, color: AllinColor.StartTextColor, size: 16) + Text("Se connecter") + .betTextStyle(weight: .semibold, color: AllinColor.PurpleText, size: 16) + } + + } + .frame(width: geometry.size.width, height: geometry.size.height) + .background(AllinColor.StartBackground) + } + } + +}