diff --git a/Sources/AllInApp b/Sources/AllInApp deleted file mode 160000 index 94ef801..0000000 --- a/Sources/AllInApp +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 94ef801de275f13f160d28a27c6a8d52e324798a diff --git a/Sources/AllInApp/AllIn/AllInApp.swift b/Sources/AllInApp/AllIn/AllInApp.swift new file mode 100644 index 0000000..2840c90 --- /dev/null +++ b/Sources/AllInApp/AllIn/AllInApp.swift @@ -0,0 +1,25 @@ +// +// AllInApp.swift +// AllIn +// +// Created by Emre on 19/09/2023. +// + +import SwiftUI + +@main +struct AllInApp: App { + + @UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate + let DI = DependencyInjection.shared + + init() { + DI.addSingleton(IAuthService.self, AuthService()) + } + + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/Sources/AllInApp/AllIn/AppDelegate.swift b/Sources/AllInApp/AllIn/AppDelegate.swift new file mode 100644 index 0000000..23517dc --- /dev/null +++ b/Sources/AllInApp/AllIn/AppDelegate.swift @@ -0,0 +1,41 @@ +// +// AppDelegate.swift +// AllIn +// +// Created by Emre on 17/12/2023. +// + +import UIKit + +class AppDelegate: UIResponder, UIApplicationDelegate { + + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool { + return true + } + + func applicationWillResignActive(_ application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. + + } + + func applicationDidEnterBackground(_ application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + + } + + func applicationWillEnterForeground(_ application: UIApplication) { + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. + + } + + func applicationDidBecomeActive(_ application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + + } + + func applicationWillTerminate(_ application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + + } +} diff --git a/Sources/AllInApp/AllIn/AppState.swift b/Sources/AllInApp/AllIn/AppState.swift new file mode 100644 index 0000000..5713c35 --- /dev/null +++ b/Sources/AllInApp/AllIn/AppState.swift @@ -0,0 +1,24 @@ +// +// AppState.swift +// AllIn +// +// Created by Emre on 17/12/2023. +// + +import SwiftUI + +class AppStateContainer: ObservableObject { + static let shared = AppStateContainer() + let loggedState: LoggedState = LoggedState() + var onlineStatus: OnlineStatus = OnlineStatus() + + @AppStorage("authenticationRefresh") var authenticationRefresh: String? +} + +class LoggedState: ObservableObject { + @Published var connectedUser: Bool = false +} + +class OnlineStatus: ObservableObject { + @Published var isOnline: Bool = true +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/AccentColor.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/AppIcon.appiconset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..f1a93eb --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,14 @@ +{ + "images" : [ + { + "filename" : "Logo.png", + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/AppIcon.appiconset/Logo.png b/Sources/AllInApp/AllIn/Assets.xcassets/AppIcon.appiconset/Logo.png new file mode 100644 index 0000000..d503a96 Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/AppIcon.appiconset/Logo.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/BackgroundColor.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/BackgroundColor.colorset/Contents.json new file mode 100644 index 0000000..2e33171 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/BackgroundColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF6", + "green" : "0xEB", + "red" : "0xEB" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x1C", + "green" : "0x1C", + "red" : "0x1C" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/BlueAccentColor.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/BlueAccentColor.colorset/Contents.json new file mode 100644 index 0000000..b60560a --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/BlueAccentColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xEE", + "green" : "0x9F", + "red" : "0x19" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xEE", + "green" : "0x9F", + "red" : "0x19" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/BlueGrey800Color.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/BlueGrey800Color.colorset/Contents.json new file mode 100644 index 0000000..c4f8d39 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/BlueGrey800Color.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x46", + "green" : "0x35", + "red" : "0x37" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x46", + "green" : "0x35", + "red" : "0x37" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/ComponentBackgroundColor.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/ComponentBackgroundColor.colorset/Contents.json new file mode 100644 index 0000000..fe25ab7 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/ComponentBackgroundColor.colorset/Contents.json @@ -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" : "0x26", + "green" : "0x26", + "red" : "0x26" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/DarkBlueColor.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/DarkBlueColor.colorset/Contents.json new file mode 100644 index 0000000..b04436f --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/DarkBlueColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x78", + "green" : "0x30", + "red" : "0x32" + } + }, + "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/AllInApp/AllIn/Assets.xcassets/DarkPurpleColor.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/DarkPurpleColor.colorset/Contents.json new file mode 100644 index 0000000..8790273 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/DarkPurpleColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF6", + "green" : "0x45", + "red" : "0x6E" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF6", + "green" : "0x45", + "red" : "0x6E" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/DelimiterGrey.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/DelimiterGrey.colorset/Contents.json new file mode 100644 index 0000000..53b0ea1 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/DelimiterGrey.colorset/Contents.json @@ -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" : "0x39", + "green" : "0x39", + "red" : "0x39" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/FireIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/FireIcon.imageset/Contents.json new file mode 100644 index 0000000..718503e --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/FireIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "fire.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/FireIcon.imageset/fire.png b/Sources/AllInApp/AllIn/Assets.xcassets/FireIcon.imageset/fire.png new file mode 100644 index 0000000..5eebab6 Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/FireIcon.imageset/fire.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/Grey100Color.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/Grey100Color.colorset/Contents.json new file mode 100644 index 0000000..cf9f629 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/Grey100Color.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/AllInApp/AllIn/Assets.xcassets/Grey400Color.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/Grey400Color.colorset/Contents.json new file mode 100644 index 0000000..cd98086 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/Grey400Color.colorset/Contents.json @@ -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 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/Grey500Color.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/Grey500Color.colorset/Contents.json new file mode 100644 index 0000000..565f02b --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/Grey500Color.colorset/Contents.json @@ -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 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/Grey50Color.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/Grey50Color.colorset/Contents.json new file mode 100644 index 0000000..09c53f9 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/Grey50Color.colorset/Contents.json @@ -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 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/Grey600Color.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/Grey600Color.colorset/Contents.json new file mode 100644 index 0000000..cf4b210 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/Grey600Color.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/AllInApp/AllIn/Assets.xcassets/Grey700Color.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/Grey700Color.colorset/Contents.json new file mode 100644 index 0000000..6c0c8b9 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/Grey700Color.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x9D", + "green" : "0x9D", + "red" : "0x9F" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x9D", + "green" : "0x9D", + "red" : "0x9F" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/Grey800Color.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/Grey800Color.colorset/Contents.json new file mode 100644 index 0000000..657fc42 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/Grey800Color.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xAA", + "green" : "0xAA", + "red" : "0xAA" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xAA", + "green" : "0xAA", + "red" : "0xAA" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/LightBlueAccentColor.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/LightBlueAccentColor.colorset/Contents.json new file mode 100644 index 0000000..011c4fe --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/LightBlueAccentColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xEC", + "green" : "0xE8", + "red" : "0x00" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xEC", + "green" : "0xE8", + "red" : "0x00" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/LightGrey100Color.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/LightGrey100Color.colorset/Contents.json new file mode 100644 index 0000000..e1ce072 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/LightGrey100Color.colorset/Contents.json @@ -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 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/LightGrey200Color.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/LightGrey200Color.colorset/Contents.json new file mode 100644 index 0000000..771d19d --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/LightGrey200Color.colorset/Contents.json @@ -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 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/LightGrey300Color.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/LightGrey300Color.colorset/Contents.json new file mode 100644 index 0000000..6b527a7 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/LightGrey300Color.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/AllInApp/AllIn/Assets.xcassets/LightPurpleColor.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/LightPurpleColor.colorset/Contents.json new file mode 100644 index 0000000..9138853 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/LightPurpleColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFB", + "green" : "0x7B", + "red" : "0x7F" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFB", + "green" : "0x7B", + "red" : "0x7F" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/LoginPurpleColor.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/LoginPurpleColor.colorset/Contents.json new file mode 100644 index 0000000..502b70e --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/LoginPurpleColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xFB", + "green" : "0x7B", + "red" : "0x7F" + } + }, + "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/AllInApp/AllIn/Assets.xcassets/PinkAccentColor.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/PinkAccentColor.colorset/Contents.json new file mode 100644 index 0000000..cd720dc --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/PinkAccentColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x89", + "green" : "0x2A", + "red" : "0xFF" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x89", + "green" : "0x2A", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/PrimaryColor.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/PrimaryColor.colorset/Contents.json new file mode 100644 index 0000000..85730c1 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/PrimaryColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x2A", + "green" : "0x2A", + "red" : "0x2A" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x2A", + "green" : "0x2A", + "red" : "0x2A" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/PrimaryTextColor.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/PrimaryTextColor.colorset/Contents.json new file mode 100644 index 0000000..d1f70bd --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/PrimaryTextColor.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/AllInApp/AllIn/Assets.xcassets/PurpleAccentColor.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/PurpleAccentColor.colorset/Contents.json new file mode 100644 index 0000000..b27cd50 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/PurpleAccentColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF3", + "green" : "0x7D", + "red" : "0xAA" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xF3", + "green" : "0x7D", + "red" : "0xAA" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/SkyBlueColor.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/SkyBlueColor.colorset/Contents.json new file mode 100644 index 0000000..eca802d --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/SkyBlueColor.colorset/Contents.json @@ -0,0 +1,38 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xE9", + "green" : "0xDE", + "red" : "0xC4" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0xE9", + "green" : "0xDE", + "red" : "0xC4" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/StartBackgroundColor.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/StartBackgroundColor.colorset/Contents.json new file mode 100644 index 0000000..29efc6f --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/StartBackgroundColor.colorset/Contents.json @@ -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" : "0x2A", + "green" : "0x2A", + "red" : "0x2A" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/UnderComponentBackgroundColor.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/UnderComponentBackgroundColor.colorset/Contents.json new file mode 100644 index 0000000..29efc6f --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/UnderComponentBackgroundColor.colorset/Contents.json @@ -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" : "0x2A", + "green" : "0x2A", + "red" : "0x2A" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/VeryLightPurpleColor.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/VeryLightPurpleColor.colorset/Contents.json new file mode 100644 index 0000000..7388cc5 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/VeryLightPurpleColor.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/AllInApp/AllIn/Assets.xcassets/WhiteColor.colorset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/WhiteColor.colorset/Contents.json new file mode 100644 index 0000000..07fe34d --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/WhiteColor.colorset/Contents.json @@ -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" : "0x2A", + "green" : "0x2A", + "red" : "0x2A" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/allcoinIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/allcoinIcon.imageset/Contents.json new file mode 100644 index 0000000..07a60a4 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/allcoinIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "allcoin.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/allcoinIcon.imageset/allcoin.png b/Sources/AllInApp/AllIn/Assets.xcassets/allcoinIcon.imageset/allcoin.png new file mode 100644 index 0000000..8f13bd2 Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/allcoinIcon.imageset/allcoin.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/allcoinWhiteIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/allcoinWhiteIcon.imageset/Contents.json new file mode 100644 index 0000000..0159b50 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/allcoinWhiteIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "allcoinWhite.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/allcoinWhiteIcon.imageset/allcoinWhite.png b/Sources/AllInApp/AllIn/Assets.xcassets/allcoinWhiteIcon.imageset/allcoinWhite.png new file mode 100644 index 0000000..128a9dc Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/allcoinWhiteIcon.imageset/allcoinWhite.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/allinIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/allinIcon.imageset/Contents.json new file mode 100644 index 0000000..e3cd8b6 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/allinIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "allin.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/allinIcon.imageset/allin.png b/Sources/AllInApp/AllIn/Assets.xcassets/allinIcon.imageset/allin.png new file mode 100644 index 0000000..6cc5c7a Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/allinIcon.imageset/allin.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/chevronDownIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/chevronDownIcon.imageset/Contents.json new file mode 100644 index 0000000..c46fd46 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/chevronDownIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "chevronDown.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/chevronDownIcon.imageset/chevronDown.png b/Sources/AllInApp/AllIn/Assets.xcassets/chevronDownIcon.imageset/chevronDown.png new file mode 100644 index 0000000..86d3dd4 Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/chevronDownIcon.imageset/chevronDown.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/chevronRightIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/chevronRightIcon.imageset/Contents.json new file mode 100644 index 0000000..5da55d7 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/chevronRightIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "chevronRight.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/chevronRightIcon.imageset/chevronRight.png b/Sources/AllInApp/AllIn/Assets.xcassets/chevronRightIcon.imageset/chevronRight.png new file mode 100644 index 0000000..3451d58 Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/chevronRightIcon.imageset/chevronRight.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/chevronUpIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/chevronUpIcon.imageset/Contents.json new file mode 100644 index 0000000..0cfcbbc --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/chevronUpIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "chevronUp.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/chevronUpIcon.imageset/chevronUp.png b/Sources/AllInApp/AllIn/Assets.xcassets/chevronUpIcon.imageset/chevronUp.png new file mode 100644 index 0000000..5920d34 Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/chevronUpIcon.imageset/chevronUp.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/crossIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/crossIcon.imageset/Contents.json new file mode 100644 index 0000000..777f530 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/crossIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "cross.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/crossIcon.imageset/cross.png b/Sources/AllInApp/AllIn/Assets.xcassets/crossIcon.imageset/cross.png new file mode 100644 index 0000000..acc68f6 Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/crossIcon.imageset/cross.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/defaultUserImage.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/defaultUserImage.imageset/Contents.json new file mode 100644 index 0000000..6f9818a --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/defaultUserImage.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "defaultUser.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/defaultUserImage.imageset/defaultUser.png b/Sources/AllInApp/AllIn/Assets.xcassets/defaultUserImage.imageset/defaultUser.png new file mode 100644 index 0000000..fd31ae8 Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/defaultUserImage.imageset/defaultUser.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/eyesImage.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/eyesImage.imageset/Contents.json new file mode 100644 index 0000000..192ea78 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/eyesImage.imageset/Contents.json @@ -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 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/eyesImage.imageset/eyes.png b/Sources/AllInApp/AllIn/Assets.xcassets/eyesImage.imageset/eyes.png new file mode 100644 index 0000000..8f18c08 Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/eyesImage.imageset/eyes.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/footballIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/footballIcon.imageset/Contents.json new file mode 100644 index 0000000..c554bc8 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/footballIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "football.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/footballIcon.imageset/football.png b/Sources/AllInApp/AllIn/Assets.xcassets/footballIcon.imageset/football.png new file mode 100644 index 0000000..ee01b1a Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/footballIcon.imageset/football.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/friendsImage.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/friendsImage.imageset/Contents.json new file mode 100644 index 0000000..25c2ff6 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/friendsImage.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "friends.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/friendsImage.imageset/friends.png b/Sources/AllInApp/AllIn/Assets.xcassets/friendsImage.imageset/friends.png new file mode 100644 index 0000000..4717cce Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/friendsImage.imageset/friends.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/gearIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/gearIcon.imageset/Contents.json new file mode 100644 index 0000000..35d5d77 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/gearIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "gear.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/gearIcon.imageset/gear.png b/Sources/AllInApp/AllIn/Assets.xcassets/gearIcon.imageset/gear.png new file mode 100644 index 0000000..546618c Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/gearIcon.imageset/gear.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/globeIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/globeIcon.imageset/Contents.json new file mode 100644 index 0000000..f689ec9 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/globeIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "globe.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/globeIcon.imageset/globe.png b/Sources/AllInApp/AllIn/Assets.xcassets/globeIcon.imageset/globe.png new file mode 100644 index 0000000..d6ed298 Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/globeIcon.imageset/globe.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/globePurpleIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/globePurpleIcon.imageset/Contents.json new file mode 100644 index 0000000..1cd5ea8 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/globePurpleIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "globePurple.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/globePurpleIcon.imageset/globePurple.png b/Sources/AllInApp/AllIn/Assets.xcassets/globePurpleIcon.imageset/globePurple.png new file mode 100644 index 0000000..e6ca5fb Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/globePurpleIcon.imageset/globePurple.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/launchScreenImage.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/launchScreenImage.imageset/Contents.json new file mode 100644 index 0000000..78fcdbe --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/launchScreenImage.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "launchScreen.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/launchScreenImage.imageset/launchScreen.png b/Sources/AllInApp/AllIn/Assets.xcassets/launchScreenImage.imageset/launchScreen.png new file mode 100644 index 0000000..dfdd829 Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/launchScreenImage.imageset/launchScreen.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/lockIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/lockIcon.imageset/Contents.json new file mode 100644 index 0000000..d19d9a5 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/lockIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "lock.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/lockIcon.imageset/lock.png b/Sources/AllInApp/AllIn/Assets.xcassets/lockIcon.imageset/lock.png new file mode 100644 index 0000000..b38720d Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/lockIcon.imageset/lock.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/lockPurpleIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/lockPurpleIcon.imageset/Contents.json new file mode 100644 index 0000000..c1cf491 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/lockPurpleIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "lockPurple.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/lockPurpleIcon.imageset/lockPurple.png b/Sources/AllInApp/AllIn/Assets.xcassets/lockPurpleIcon.imageset/lockPurple.png new file mode 100644 index 0000000..95cf5b6 Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/lockPurpleIcon.imageset/lockPurple.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/modalBackgroundImage.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/modalBackgroundImage.imageset/Contents.json new file mode 100644 index 0000000..9f447e1 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/modalBackgroundImage.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "background.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/modalBackgroundImage.imageset/background.png b/Sources/AllInApp/AllIn/Assets.xcassets/modalBackgroundImage.imageset/background.png new file mode 100644 index 0000000..afdcbae Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/modalBackgroundImage.imageset/background.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/moneyImage.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/moneyImage.imageset/Contents.json new file mode 100644 index 0000000..867cf21 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/moneyImage.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "money.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/moneyImage.imageset/money.png b/Sources/AllInApp/AllIn/Assets.xcassets/moneyImage.imageset/money.png new file mode 100644 index 0000000..211c0b7 Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/moneyImage.imageset/money.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/paintbrushIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/paintbrushIcon.imageset/Contents.json new file mode 100644 index 0000000..c1971ab --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/paintbrushIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "paintbrush.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/paintbrushIcon.imageset/paintbrush.png b/Sources/AllInApp/AllIn/Assets.xcassets/paintbrushIcon.imageset/paintbrush.png new file mode 100644 index 0000000..a117356 Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/paintbrushIcon.imageset/paintbrush.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/questionMarkGreyIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/questionMarkGreyIcon.imageset/Contents.json new file mode 100644 index 0000000..f1e481d --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/questionMarkGreyIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "questionMarkGrey.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/questionMarkGreyIcon.imageset/questionMarkGrey.png b/Sources/AllInApp/AllIn/Assets.xcassets/questionMarkGreyIcon.imageset/questionMarkGrey.png new file mode 100644 index 0000000..c8b22bc Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/questionMarkGreyIcon.imageset/questionMarkGrey.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/questionMarkIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/questionMarkIcon.imageset/Contents.json new file mode 100644 index 0000000..9681204 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/questionMarkIcon.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "questionMark.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/questionMarkIcon.imageset/questionMark.png b/Sources/AllInApp/AllIn/Assets.xcassets/questionMarkIcon.imageset/questionMark.png new file mode 100644 index 0000000..2a901f8 Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/questionMarkIcon.imageset/questionMark.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/threeLinesIcon.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/threeLinesIcon.imageset/Contents.json new file mode 100644 index 0000000..5798619 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/threeLinesIcon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "filename" : "threeLines 1.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "threeLines.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/threeLinesIcon.imageset/threeLines 1.png b/Sources/AllInApp/AllIn/Assets.xcassets/threeLinesIcon.imageset/threeLines 1.png new file mode 100644 index 0000000..384f876 Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/threeLinesIcon.imageset/threeLines 1.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/threeLinesIcon.imageset/threeLines.png b/Sources/AllInApp/AllIn/Assets.xcassets/threeLinesIcon.imageset/threeLines.png new file mode 100644 index 0000000..669b731 Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/threeLinesIcon.imageset/threeLines.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/videoGameImage.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/videoGameImage.imageset/Contents.json new file mode 100644 index 0000000..8852f6e --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/videoGameImage.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "videoGame.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/videoGameImage.imageset/videoGame.png b/Sources/AllInApp/AllIn/Assets.xcassets/videoGameImage.imageset/videoGame.png new file mode 100644 index 0000000..dfa5d64 Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/videoGameImage.imageset/videoGame.png differ diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/welcomeBackgroundImage.imageset/Contents.json b/Sources/AllInApp/AllIn/Assets.xcassets/welcomeBackgroundImage.imageset/Contents.json new file mode 100644 index 0000000..92b4a39 --- /dev/null +++ b/Sources/AllInApp/AllIn/Assets.xcassets/welcomeBackgroundImage.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "WelcomeBackground.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Assets.xcassets/welcomeBackgroundImage.imageset/WelcomeBackground.png b/Sources/AllInApp/AllIn/Assets.xcassets/welcomeBackgroundImage.imageset/WelcomeBackground.png new file mode 100644 index 0000000..e1eca81 Binary files /dev/null and b/Sources/AllInApp/AllIn/Assets.xcassets/welcomeBackgroundImage.imageset/WelcomeBackground.png differ diff --git a/Sources/AllInApp/AllIn/Components/AllcoinsCapsule.swift b/Sources/AllInApp/AllIn/Components/AllcoinsCapsule.swift new file mode 100644 index 0000000..0fc7a7c --- /dev/null +++ b/Sources/AllInApp/AllIn/Components/AllcoinsCapsule.swift @@ -0,0 +1,35 @@ +// +// AllcoinsCount.swift +// AllIn +// +// Created by Lucas on 28/09/2023. +// + +import SwiftUI + +struct AllcoinsCapsule: View { + var body: some View { + Text("Vous remportez") + .foregroundColor(.white) + HStack{ + Text("2340") + .textStyle(weight: .bold, color: .white, size: 60) + Image("allcoinWhiteIcon") + .resizable() + .frame(width: 40, height:40) + .scaledToFit() + } + .padding([.leading,.trailing],30) + .padding([.top,.bottom],10) + .background(.white.opacity(0.09)) + .cornerRadius(999, corners: .allCorners) + .clipShape(Capsule()) + .overlay(RoundedRectangle(cornerRadius: 999).stroke(.white, lineWidth: 1.5)) + } +} + +struct AllcoinsCapsule_Previews: PreviewProvider { + static var previews: some View { + AllcoinsCapsule() + } +} diff --git a/Sources/AllInApp/AllIn/Components/AllcoinsCounter.swift b/Sources/AllInApp/AllIn/Components/AllcoinsCounter.swift new file mode 100644 index 0000000..d7b1115 --- /dev/null +++ b/Sources/AllInApp/AllIn/Components/AllcoinsCounter.swift @@ -0,0 +1,31 @@ +// +// AllcoinsCounter.swift +// AllIn +// +// Created by Emre on 20/09/2023. +// + +import SwiftUI + +struct AllcoinsCounter: View { + var body: some View { + HStack(alignment: .center) { + Image("allcoinIcon") + .resizable() + .frame(width: 17, height: 17, alignment: .leading) + Text("541") + .fontWeight(.black) + .foregroundColor(AllInColors.primaryColor) + } + .frame(width: 90, height: 40) + .background(Color.white) + .cornerRadius(9999, corners: [.topLeft, .bottomLeft]) + + } +} + +struct AllcoinsCounter_Previews: PreviewProvider { + static var previews: some View { + AllcoinsCounter() + } +} diff --git a/Sources/AllInApp/AllIn/Components/BetCard.swift b/Sources/AllInApp/AllIn/Components/BetCard.swift new file mode 100644 index 0000000..b58bb1e --- /dev/null +++ b/Sources/AllInApp/AllIn/Components/BetCard.swift @@ -0,0 +1,81 @@ +// +// BetCard.swift +// AllIn +// +// Created by Lucas on 24/09/2023. +// + +import SwiftUI + +struct BetCard: View { + var body: some View { + VStack(spacing: 0){ + VStack(alignment: .leading,spacing: 2){ + HStack{ + Spacer() + Text("proposé par Lucas").font(.system(size: 10)).foregroundColor(AllInColors.grey800Color) + + } + Text("Etudes").font(.system(size: 15)).foregroundColor(AllInColors.grey800Color) + Text("Emre va réussir son TP de CI/CD mercredi?").font(.system(size: 20)).fontWeight(.bold) + HStack{ + Text("Commence le").font(.system(size: 15)).foregroundColor(AllInColors.grey800Color) + TextCapsule() + TextCapsule() + Spacer() + + } + } + .frame(width: .infinity) + .padding(.all,15) + .background(AllInColors.componentBackgroundColor).cornerRadius(20, corners: [.topLeft,.topRight]).padding(.bottom,0) + + VStack(alignment: .leading,spacing: 2){ + HStack{ + Spacer() + UsersPreview() + Text(" 4 joueurs en attente").font(.system(size: 15)).foregroundColor(AllInColors.grey800Color).fontWeight(.medium) + + Spacer() + + }.padding(0) + Button { + + } label: { + Text("Participer") + .font(.system(size: 30)) + .fontWeight(.bold) + .frame(maxWidth: .infinity).padding(10) + .multilineTextAlignment(.center) + .overlay { + AllInColors.primaryGradient.frame(width: 170) + .mask( + Text("Participer") + .font(.system(size: 30)) + .fontWeight(.bold) + .frame(maxWidth: .infinity).padding(10) + ) + } + } + .accentColor(AllInColors.componentBackgroundColor) + .buttonStyle(.borderedProminent).cornerRadius(4.0) + .overlay( + RoundedRectangle(cornerRadius: 12).stroke(AllInColors.delimiterGrey, lineWidth: 1) + ).padding([.top],5) + + } + .frame(width: .infinity) + .padding(.all,8) + .background(AllInColors.underComponentBackgroundColor) + .cornerRadius(20, corners: [.bottomLeft,.bottomRight]) + .border(width: 1, edges: [.top], color: AllInColors.delimiterGrey) + } + } +} + +struct BetCard_Previews: PreviewProvider { + static var previews: some View { + BetCard() + .preferredColorScheme(.dark) + } +} diff --git a/Sources/AllInApp/AllIn/Components/ChoiceCapsule.swift b/Sources/AllInApp/AllIn/Components/ChoiceCapsule.swift new file mode 100644 index 0000000..f6fc4bc --- /dev/null +++ b/Sources/AllInApp/AllIn/Components/ChoiceCapsule.swift @@ -0,0 +1,47 @@ +// +// ChoiceCapsule.swift +// AllIn +// +// Created by Lucas on 26/09/2023. +// + +import SwiftUI + +struct ChoiceCapsule: View { + + @State var pressed = false + + var body: some View { + Group { + if(pressed) { + Text("En cours") + .textStyle(weight: .semibold, color: .white, size: 15) + .padding([.leading,.trailing],13.8) + .padding([.top,.bottom], 7) + .background(AllInColors.lightPurpleColor) + .clipShape(Capsule()) + } else { + Text("En cours") + .textStyle(weight: .regular, color: AllInColors.grey800Color, size: 15) + .padding([.leading,.trailing], 15) + .padding([.top,.bottom], 7) + .background(AllInColors.underComponentBackgroundColor) + .clipShape(Capsule()) + .overlay( + RoundedRectangle(cornerRadius: 20) + .stroke(AllInColors.delimiterGrey, lineWidth: 1) + ) + } + } + .onTapGesture() { + pressed.toggle() + } + + } +} + +struct ChoiceCapsule_Previews: PreviewProvider { + static var previews: some View { + ChoiceCapsule() + } +} diff --git a/Sources/AllInApp/AllIn/Components/ConfidentialityButton.swift b/Sources/AllInApp/AllIn/Components/ConfidentialityButton.swift new file mode 100644 index 0000000..752e09c --- /dev/null +++ b/Sources/AllInApp/AllIn/Components/ConfidentialityButton.swift @@ -0,0 +1,38 @@ +// +// ConfidentialityButton.swift +// AllIn +// +// Created by Emre on 29/09/2023. +// + +import SwiftUI + +struct ConfidentialityButton: View { + + var image: String + var text: String + var selected: Bool + + var body: some View { + HStack() { + Image(selected ? image + "Icon" : image + "PurpleIcon") + .resizable() + .scaledToFit() + .padding(.vertical, 12) + + Text(text) + .font(.system(size: 17)) + .fontWeight(.bold) + .foregroundColor(selected ? .white : AllInColors.lightPurpleColor) + } + .frame(width: 110, height: 45) + .background(selected ? AllInColors.lightPurpleColor : AllInColors.componentBackgroundColor) + .cornerRadius(10) + } +} + +struct ConfidentialityButton_Previews: PreviewProvider { + static var previews: some View { + ConfidentialityButton(image: "lock", text: "Privé", selected: true) + } +} diff --git a/Sources/AllInApp/AllIn/Components/DropDownFriends.swift b/Sources/AllInApp/AllIn/Components/DropDownFriends.swift new file mode 100644 index 0000000..0789158 --- /dev/null +++ b/Sources/AllInApp/AllIn/Components/DropDownFriends.swift @@ -0,0 +1,98 @@ +// +// DropDownFriends.swift +// AllIn +// +// Created by Emre on 16/12/2023. +// + +import SwiftUI + +struct DropDownFriends: View { + + @State private var selectedItems: Set = [] + @State var expand = false + let friends: [(Int, Int, String, String)] = [ + (0, 541, "David", "defaultUserImage"), + (1, 541, "David", "defaultUserImage"), + (2, 541, "David", "defaultUserImage"), + (3, 541, "David", "defaultUserImage"), + (4, 541, "David", "defaultUserImage"), + (5, 541, "David", "defaultUserImage") + ] + + var body: some View { + VStack(spacing: 0, content: { + Button(action: { self.expand.toggle() }) { + HStack(spacing: 3){ + Text("41") + .textStyle(weight: .bold, color: AllInColors.primaryTextColor, size: 15) + Text("amis disponibles") + .textStyle(weight: .regular, color: AllInColors.grey800Color, size: 15) + + Spacer() + Image(expand ? "chevronUpIcon" : "chevronDownIcon").resizable().frame(width: 15, height: 7).scaledToFill() + } + .padding([.leading, .trailing], 15) + .padding(.top, 5) + .frame(height: 43) + } + if expand { + Rectangle() + .frame(height: 1) + .foregroundColor(AllInColors.delimiterGrey) + ScrollView(.vertical) { + VStack(spacing: 0) { + ForEach(0..: View { + var contentWidth: CGFloat + var content: (() -> Content) + + @State + var xOffset: CGFloat = -800 + + var body: some View { + ScrollView(.horizontal, showsIndicators: false) { + HStack(spacing: 0) { + content() + content() + content() + content() + content() + content() + content() + content() + } + .offset(x: xOffset, y: 0) + } + .disabled(true) + .onAppear { + withAnimation( + .linear(duration: 25) + .repeatForever(autoreverses: false) + ) { + xOffset = +contentWidth + } + } + .frame(width: 1200) + .rotationEffect(.degrees(-30)) + .opacity(0.04) + } +} diff --git a/Sources/AllInApp/AllIn/ContentView.swift b/Sources/AllInApp/AllIn/ContentView.swift new file mode 100644 index 0000000..f00a6ca --- /dev/null +++ b/Sources/AllInApp/AllIn/ContentView.swift @@ -0,0 +1,37 @@ +// +// ContentView.swift +// AllIn +// +// Created by Emre on 19/09/2023. +// + +import SwiftUI + +struct ContentView: View { + + @Inject var authService: IAuthService + @ObservedObject var loggedState = AppStateContainer.shared.loggedState + + var body: some View { + VStack { + NavigationView { + if loggedState.connectedUser { + MainView(page: "Bet") + } else { + WelcomeView() + } + } + .navigationViewStyle(StackNavigationViewStyle()) + } + .onAppear { + //authService.refreshAuthentication() { status in } + } + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + .preferredColorScheme(.dark) + } +} diff --git a/Sources/AllInApp/AllIn/Extensions/Extensions.swift b/Sources/AllInApp/AllIn/Extensions/Extensions.swift new file mode 100644 index 0000000..74732e0 --- /dev/null +++ b/Sources/AllInApp/AllIn/Extensions/Extensions.swift @@ -0,0 +1,85 @@ +// +// Extensions.swift +// AllIn +// +// Created by Lucas on 20/09/2023. +// + +import Foundation +import SwiftUI + +extension Text { + func textStyle(weight: Font.Weight, color: Color, size: CGFloat) -> Text { + return self + .fontWeight(weight) + .foregroundColor(color) + .font(.system(size: size)) + } +} + +struct RoundedCorner: Shape { + var radius: CGFloat = .infinity + var corners: UIRectCorner = .allCorners + + func path(in rect: CGRect) -> Path { + let path = UIBezierPath(roundedRect: rect, byRoundingCorners: corners, cornerRadii: CGSize(width: radius, height: radius)) + return Path(path.cgPath) + } +} + +extension View { + func cornerRadius(_ radius: CGFloat, corners: UIRectCorner) -> some View { + clipShape(RoundedCorner(radius: radius, corners: corners) ) + } +} + +extension View { + func border(width: CGFloat, edges: [Edge], color: Color) -> some View { + overlay(EdgeBorder(width: width, edges: edges).foregroundColor(color)) + } +} + +struct EdgeBorder: Shape { + var width: CGFloat + var edges: [Edge] + + func path(in rect: CGRect) -> Path { + edges.map { edge -> Path in + switch edge { + case .top: return Path(.init(x: rect.minX, y: rect.minY, width: rect.width, height: width)) + case .bottom: return Path(.init(x: rect.minX, y: rect.maxY - width, width: rect.width, height: width)) + case .leading: return Path(.init(x: rect.minX, y: rect.minY, width: width, height: rect.height)) + case .trailing: return Path(.init(x: rect.maxX - width, y: rect.minY, width: width, height: rect.height)) + } + }.reduce(into: Path()) { $0.addPath($1) } + } +} + +extension View { + func hideKeyboard() { + let resign = #selector(UIResponder.resignFirstResponder) + UIApplication.shared.sendAction(resign, to: nil, from: nil, for: nil) + } +} + +extension View { + func allInPopover(isPresented: Binding, paddingHorizontal: CGFloat = 15, content: @escaping () -> String, textColor: Color = .white, fontSize: CGFloat = 12, frameWidth: CGFloat = 270) -> some View { + self.onTapGesture { + isPresented.wrappedValue.toggle() + } + .popover(isPresented: isPresented, attachmentAnchor: .point(.top)) { + ZStack { + AllInColors.primaryColor // Couleur de fond + .edgesIgnoringSafeArea(.all) + + VStack(alignment: .leading, spacing: 12) { + Text(content()) + .textStyle(weight: .regular, color: textColor, size: fontSize) + } + .padding([.leading, .trailing], paddingHorizontal) + .frame(width: frameWidth) + .presentationCompactAdaptation(.popover) + } + } + } +} diff --git a/Sources/AllInApp/AllIn/Launch Screen.storyboard b/Sources/AllInApp/AllIn/Launch Screen.storyboard new file mode 100644 index 0000000..c275078 --- /dev/null +++ b/Sources/AllInApp/AllIn/Launch Screen.storyboard @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/AllInApp/AllIn/Models/DependancyInjection.swift b/Sources/AllInApp/AllIn/Models/DependancyInjection.swift new file mode 100644 index 0000000..a5cd5fd --- /dev/null +++ b/Sources/AllInApp/AllIn/Models/DependancyInjection.swift @@ -0,0 +1,51 @@ +// +// DependancyInjection.swift +// AllIn +// +// Created by Emre on 20/10/2023. +// + +import Foundation + +class DependencyInjection { + static var shared = DependencyInjection() + private var singletons = [String: Any]() + + @discardableResult + func addSingleton(_ type: T.Type, _ instance: T) -> DependencyInjection { + let key = String(describing: T.self) + singletons[key] = instance + return self + } + + func resolve(_ type: T.Type) -> T? { + let key = String(describing: T.self) + return singletons[key] as? T + } +} + +@propertyWrapper +struct Inject { + private var value: T? + + init() { + self.value = DependencyInjection.shared.resolve(T.self) + } + + var wrappedValue: T { + get { + if let value = value { + return value + } else { + if let resolvedValue = DependencyInjection.shared.resolve(T.self) { + return resolvedValue + } else { + fatalError("Dependency not registered in DependencyInjection.") + } + } + } + set { + value = newValue + } + } +} diff --git a/Sources/AllInApp/AllIn/Models/User.swift b/Sources/AllInApp/AllIn/Models/User.swift new file mode 100644 index 0000000..d0cfac8 --- /dev/null +++ b/Sources/AllInApp/AllIn/Models/User.swift @@ -0,0 +1,22 @@ +// +// User.swift +// AllIn +// +// Created by Emre on 11/10/2023. +// + +import Foundation + +class User { + + public var username: String + public var email: String + public var nbCoins: Int + + public init(username: String, email: String, nbCoins: Int) + { + self.username = username + self.email = email + self.nbCoins = nbCoins + } +} diff --git a/Sources/AllInApp/AllIn/Preview Content/Preview Assets.xcassets/Contents.json b/Sources/AllInApp/AllIn/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Sources/AllInApp/AllIn/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Sources/AllInApp/AllIn/Ressources/Colors.swift b/Sources/AllInApp/AllIn/Ressources/Colors.swift new file mode 100644 index 0000000..2f53a3e --- /dev/null +++ b/Sources/AllInApp/AllIn/Ressources/Colors.swift @@ -0,0 +1,63 @@ +// +// Colors.swift +// AllIn +// +// Created by Lucas on 21/09/2023. +// + +import Foundation +import SwiftUI + +struct AllInColors { + // Primary + static let lightBlueAccentColor = Color("LightBlueAccentColor") + static let blueAccentColor = Color("BlueAccentColor") + static let purpleAccentColor = Color("PurpleAccentColor") + static let pinkAccentColor = Color("PinkAccentColor") + static let primaryColor = Color("PrimaryColor") + static let primaryTextColor = Color("PrimaryTextColor") + + // Bet + static let delimiterGrey = Color("DelimiterGrey") + + // Create Bet + static let veryLightPurpleColor = Color("VeryLightPurpleColor") + static let skyBlueColor = Color("SkyBlueColor") + + // Start, Register and Login + static let startBackgroundColor = Color("StartBackgroundColor") + static let loginPurpleColor = Color("LoginPurpleColor") + static let whiteColor = Color("WhiteColor") + + // Others + static let backgroundColor = Color("BackgroundColor") + static let darkBlueColor = Color("DarkBlueColor") + static let darkPurpleColor = Color("DarkPurpleColor") + static let lightPurpleColor = Color("LightPurpleColor") + static let blueGrey800Color = Color("BlueGrey800Color") + static let grey50Color = Color("Grey50Color") + static let grey100Color = Color("Grey100Color") + static let grey400Color = Color("Grey400Color") + static let grey500Color = Color("Grey500Color") + static let grey600Color = Color("Grey600Color") + static let grey700Color = Color("Grey700Color") + static let grey800Color = Color("Grey800Color") + static let lightGrey100Color = Color("LightGrey100Color") + static let lightGrey200Color = Color("LightGrey200Color") + static let lightGrey300Color = Color("LightGrey300Color") + static let componentBackgroundColor = Color("ComponentBackgroundColor") + static let underComponentBackgroundColor = Color("UnderComponentBackgroundColor") + + // Gradients + static let primaryGradient = LinearGradient( + gradient: Gradient(colors: [AllInColors.pinkAccentColor, AllInColors.blueAccentColor]), + startPoint: .bottomLeading, + endPoint: .topTrailing + ) + static let fadeInGradiantCard = LinearGradient( + gradient: Gradient(colors: [AllInColors.backgroundColor.opacity(0), AllInColors.backgroundColor.opacity(0.9), AllInColors.backgroundColor]), + startPoint: .bottom, + endPoint: .top + ) + +} diff --git a/Sources/AllInApp/AllIn/Ressources/Config.swift b/Sources/AllInApp/AllIn/Ressources/Config.swift new file mode 100644 index 0000000..e235a9a --- /dev/null +++ b/Sources/AllInApp/AllIn/Ressources/Config.swift @@ -0,0 +1,12 @@ +// +// Config.swift +// AllIn +// +// Created by Emre on 09/12/2023. +// + +import Foundation + +struct Config { + static let allInApi = "https://codefirst.iut.uca.fr/containers/AllDev-api" +} diff --git a/Sources/AllInApp/AllIn/Services/AuthService.swift b/Sources/AllInApp/AllIn/Services/AuthService.swift new file mode 100644 index 0000000..da682fa --- /dev/null +++ b/Sources/AllInApp/AllIn/Services/AuthService.swift @@ -0,0 +1,88 @@ +// +// AuthService.swift +// AllIn +// +// Created by Emre on 11/10/2023. +// + +import Foundation + +class AuthService: IAuthService { + + public func login(login: String, password: String, completion : @escaping (Int)-> ()) { + + let url = URL(string: Config.allInApi + "users/login")! + var request = URLRequest(url: url) + request.httpMethod = "POST" + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + + let json = [ + "login": login.lowercased(), + "password": password, + ] + + if let jsonData = try? JSONSerialization.data(withJSONObject: json, options: []){ + URLSession.shared.uploadTask(with: request, from: jsonData) { data, response, error in + print ("ALLIN : Process LOGIN") + if let httpResponse = response as? HTTPURLResponse { + if httpResponse.statusCode == 200 { + if let data = data, + let json = try? JSONSerialization.jsonObject(with: data, options: []) as? [String: Any], + let token = json["token"] as? String { + AppStateContainer.shared.authenticationRefresh = token; + } + } + + completion(httpResponse.statusCode) + } + }.resume() + } + } + + func register(username: String, email: String, password: String, completion : @escaping (Int)-> ()) { + let url = URL(string: Config.allInApi + "/users/register")! + var request = URLRequest(url: url) + request.httpMethod = "POST" + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + + let json = [ + "email": email, + "username": username.lowercased(), + "password": password, + "nbCoins": "0" + ] + + if let jsonData = try? JSONSerialization.data(withJSONObject: json, options: []){ + URLSession.shared.uploadTask(with: request, from: jsonData) { data, response, error in + print ("ALLIN : Process REGISTER") + if let httpResponse = response as? HTTPURLResponse { + completion(httpResponse.statusCode) + } + }.resume() + } + } + + func refreshAuthentication(completion: @escaping (Int) -> ()) { + + guard let token = AppStateContainer.shared.authenticationRefresh else { + completion(401) + return + } + + let url = URL(string: Config.allInApi + "users/token")! + var request = URLRequest(url: url) + request.httpMethod = "GET" + request.setValue("application/json", forHTTPHeaderField: "Content-Type") + request.setValue("Bearer \(token)", forHTTPHeaderField: "Authorization") + + URLSession.shared.dataTask(with: request) { data, response, error in + if let httpResponse = response as? HTTPURLResponse { + completion(httpResponse.statusCode) + if httpResponse.statusCode == 200 { + AppStateContainer.shared.loggedState.connectedUser = true + } + } + }.resume() + } + +} diff --git a/Sources/AllInApp/AllIn/Services/IAuthService.swift b/Sources/AllInApp/AllIn/Services/IAuthService.swift new file mode 100644 index 0000000..b9d8b50 --- /dev/null +++ b/Sources/AllInApp/AllIn/Services/IAuthService.swift @@ -0,0 +1,14 @@ +// +// IAuthService.swift +// AllIn +// +// Created by Emre on 28/10/2023. +// + +import Foundation + +protocol IAuthService { + func login(login: String, password: String, completion : @escaping (Int)-> ()) + func register(username: String, email: String, password: String, completion : @escaping (Int)-> ()) + func refreshAuthentication(completion: @escaping (Int) -> ()) +} diff --git a/Sources/AllInApp/AllIn/ViewModels/LoginViewModel.swift b/Sources/AllInApp/AllIn/ViewModels/LoginViewModel.swift new file mode 100644 index 0000000..342d479 --- /dev/null +++ b/Sources/AllInApp/AllIn/ViewModels/LoginViewModel.swift @@ -0,0 +1,90 @@ +// +// LoginViewModel.swift +// AllIn +// +// Created by Emre on 17/12/2023. +// + +import Foundation +import SwiftUI + +class LoginViewModel: ObservableObject { + + @Inject var authService: IAuthService + @Published var loginIdentifier: String = "" + @Published var loginPassword: String = "" + + @Published var loginIdentifierFieldError: String? + @Published var loginPasswordFieldError: String? + + @Published var errorMessage: String? + @Published var showErrorMessage = false + + func login() { + + guard checkAndSetError(forLogin: true, forPassword: true) else { + return + } + + self.showErrorMessage = false + resetAllFieldErrors() + + authService.login(login: loginIdentifier, password: loginPassword) { statusCode in + switch statusCode { + case 200: + self.onLoginSuccess() + case 404: + AppStateContainer.shared.loggedState.connectedUser = false + self.setErrorMessage(errorMessage: "Login ou mot de passe incorrects.") + default: + AppStateContainer.shared.loggedState.connectedUser = false + self.setErrorMessage(errorMessage: "La connexion a échoué. Veuillez réessayer.") + } + } + } + + private func onLoginSuccess() { + AppStateContainer.shared.loggedState.connectedUser = true + } + + func checkAndSetError(forLogin checkLogin: Bool, forPassword checkPassword: Bool) -> Bool { + var newLoginIdentifierFieldError: String? + var newLoginPasswordFieldError: String? + var hasError = false + + // Login + if checkLogin, loginIdentifier.isEmpty { + newLoginIdentifierFieldError = "Veuillez saisir votre identifiant." + hasError = true + } + + // Password + if checkPassword, loginPassword.isEmpty { + newLoginPasswordFieldError = "Veuillez saisir votre mot de passe." + hasError = true + } + + if !hasError { + // No error + return true + } + + withAnimation { + loginIdentifierFieldError = newLoginIdentifierFieldError + loginPasswordFieldError = newLoginPasswordFieldError + } + return false + } + + func resetAllFieldErrors() { + withAnimation { + loginIdentifierFieldError = nil + loginPasswordFieldError = nil + } + } + + func setErrorMessage(errorMessage: String) { + self.showErrorMessage = true + self.errorMessage = errorMessage + } +} diff --git a/Sources/AllInApp/AllIn/ViewModels/RegisterViewModel.swift b/Sources/AllInApp/AllIn/ViewModels/RegisterViewModel.swift new file mode 100644 index 0000000..c206362 --- /dev/null +++ b/Sources/AllInApp/AllIn/ViewModels/RegisterViewModel.swift @@ -0,0 +1,127 @@ +// +// RegisterViewModel.swift +// AllIn +// +// Created by Emre on 20/12/2023. +// + +import Foundation +import SwiftUI + +class RegisterViewModel: ObservableObject { + + @Inject var authService: IAuthService + @Published var registerUsername: String = "" + @Published var registerEmail: String = "" + @Published var registerPassword: String = "" + @Published var registerConfirmPassword: String = "" + + @Published var registerUsernameFieldError: String? + @Published var registerEmailFieldError: String? + @Published var registerPasswordFieldError: String? + @Published var registerConfirmPasswordFieldError: String? + + @Published var errorMessage: String? + @Published var showErrorMessage = false + + func register() { + + guard checkAndSetError(forUsername: true, forEmail: true, forPassword: true, forConfirmPassword: true) else { + return + } + + self.showErrorMessage = false + resetAllFieldErrors() + + authService.register(username: registerUsername, email: registerEmail, password: registerPassword) { statusCode in + switch statusCode { + case 201: + self.onRegisterSuccess() + case 409: + AppStateContainer.shared.loggedState.connectedUser = false + self.setErrorMessage(errorMessage: "Email ou pseudo déjà utilisé.") + default: + AppStateContainer.shared.loggedState.connectedUser = false + self.setErrorMessage(errorMessage: "La connexion a échoué. Veuillez réessayer.") + } + } + } + + private func onRegisterSuccess() { + AppStateContainer.shared.loggedState.connectedUser = true + } + + func checkAndSetError(forUsername checkUsername: Bool, forEmail checkEmail: Bool, forPassword checkPassword: Bool, forConfirmPassword checkConfirmPassword: Bool) -> Bool { + var newRegisterUsernameFieldError: String? + var newRegisterEmailFieldError: String? + var newRegisterPasswordFieldError: String? + var newRegisterConfirmPasswordFieldError: String? + var hasError = false + + // Username + if checkUsername, registerUsername.isEmpty { + newRegisterUsernameFieldError = "Veuillez saisir votre pseudo." + hasError = true + } + + // Email + if checkEmail, registerEmail.isEmpty { + newRegisterEmailFieldError = "Veuillez saisir votre email." + hasError = true + } + + if checkEmail, isValidEmail(email: registerEmail) { + newRegisterEmailFieldError = "Veuillez saisir un email valide." + hasError = true + } + + // Password + if checkPassword, registerPassword.isEmpty { + newRegisterPasswordFieldError = "Veuillez saisir votre mot de passe." + hasError = true + } + + // Confirm password + if checkConfirmPassword, registerConfirmPassword.isEmpty { + newRegisterConfirmPasswordFieldError = "Veuillez confirmer votre mot de passe." + hasError = true + } + + if checkConfirmPassword, registerConfirmPassword != registerPassword { + newRegisterConfirmPasswordFieldError = "Les mots de passe ne sont pas identiques." + hasError = true + } + + if !hasError { + // No error + return true + } + + withAnimation { + registerUsernameFieldError = newRegisterUsernameFieldError + registerEmailFieldError = newRegisterEmailFieldError + registerPasswordFieldError = newRegisterPasswordFieldError + registerConfirmPasswordFieldError = newRegisterConfirmPasswordFieldError + } + return false + } + + func resetAllFieldErrors() { + withAnimation { + registerUsernameFieldError = nil + registerEmailFieldError = nil + registerPasswordFieldError = nil + registerConfirmPasswordFieldError = nil + } + } + + func setErrorMessage(errorMessage: String) { + self.showErrorMessage = true + self.errorMessage = errorMessage + } + + func isValidEmail(email: String) -> Bool + { + return email.range(of:"^\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$", options: .regularExpression) == nil + } +} diff --git a/Sources/AllInApp/AllIn/Views/BetView.swift b/Sources/AllInApp/AllIn/Views/BetView.swift new file mode 100644 index 0000000..9e09671 --- /dev/null +++ b/Sources/AllInApp/AllIn/Views/BetView.swift @@ -0,0 +1,70 @@ +// +// BetView.swift +// AllIn +// +// Created by Lucas on 22/09/2023. +// + +import SwiftUI + +struct BetView: View { + + @Binding var showMenu: Bool + @State private var showingSheet = false + + var body: some View { + + VStack(alignment: .center, spacing: 0) { + + TopBar(showMenu: self.$showMenu) + ScrollView(showsIndicators: false) { + LazyVStack(alignment: .leading, spacing: 0, pinnedViews: [.sectionHeaders]) { + + TrendingBetCard().padding(.top,25).padding([.leading,.trailing],25) + + Section { + VStack(spacing: 20){ + BetCard() + BetCard() + Button("Show Sheet") { + showingSheet.toggle() + } + .sheet(isPresented: $showingSheet) { + WinModal() + } + } + .padding([.leading,.trailing],25) + + } header: { + ZStack{ + AllInColors.fadeInGradiantCard + ScrollView(.horizontal,showsIndicators: false){ + HStack{ + ChoiceCapsule() + ChoiceCapsule() + ChoiceCapsule() + ChoiceCapsule() + ChoiceCapsule() + ChoiceCapsule() + ChoiceCapsule() + } + .padding(.leading,25) + .padding([.top,.bottom],15) + } + } + } + } + } + Spacer() + } + .edgesIgnoringSafeArea(.bottom) + .background(AllInColors.backgroundColor) + } +} + +struct BetView_Previews: PreviewProvider { + static var previews: some View { + BetView(showMenu: .constant(false)) + .preferredColorScheme(.dark) + } +} diff --git a/Sources/AllInApp/AllIn/Views/CreationBetView.swift b/Sources/AllInApp/AllIn/Views/CreationBetView.swift new file mode 100644 index 0000000..d350926 --- /dev/null +++ b/Sources/AllInApp/AllIn/Views/CreationBetView.swift @@ -0,0 +1,459 @@ +// +// CreateBetView.swift +// AllIn +// +// Created by Emre on 29/09/2023. +// + +import SwiftUI + +struct CreationBetView: View { + + @State private var showTitlePopover: Bool = false + @State private var showDescriptionPopover: Bool = false + @State private var showRegistrationEndDatePopover: Bool = false + @State private var showBetEndDatePopover: Bool = false + @State private var showConfidentialityPopover: Bool = false + + @State private var selectedTab = 0 + @Binding var showMenu: Bool + @State var selectedConfidentiality = true + @State private var theme: String = "" + @State private var description: String = "" + @State var present = false + @State private var endRegisterDate = Date() + @State private var endBetDate = Date() + let dateRange: ClosedRange = { + let calendar = Calendar.current + let startDate = Date() + let endDate = calendar.date(byAdding: .year, value: 10, to: startDate)! + return startDate ... endDate + }() + @State private var response = "" + @State private var values: [String] = [] + + @State private var selectedOption = 0 + let options: [(Int, String, String)] = [ + (0, "questionMarkIcon", "Oui / Non"), + (1, "footballIcon", "Pari sportif"), + (2, "paintbrushIcon", "Réponses personnalisées") + ] + + @State var groupedItems: [[String]] = [[String]] () + let screenWidth = UIScreen.main.bounds.width + + private func updateGroupedItems() { + + var updatedGroupedItems: [[String]] = [[String]] () + var tempItems: [String] = [String] () + var width: CGFloat = 0 + var dynamicWidthLimit: CGFloat + + for value in values { + let label = UILabel() + label.text = value + label.sizeToFit() + dynamicWidthLimit = CGFloat(tempItems.count) * 105.0 + + let labelWidth = label.frame.size.width + if (width + labelWidth + dynamicWidthLimit) < screenWidth { + width += labelWidth + tempItems.append(value) + } else { + width = labelWidth + updatedGroupedItems.append(tempItems) + tempItems.removeAll() + tempItems.append(value) + } + } + updatedGroupedItems.append(tempItems) + + groupedItems = updatedGroupedItems + } + + var body: some View { + VStack(alignment: .center, spacing: 0) { + TopBar(showMenu: self.$showMenu) + TabView(selection: $selectedTab) { + + // First Page + ScrollView(showsIndicators: false) { + VStack(spacing: 5) { + VStack() { + HStack(spacing: 5) { + Text("Thème") + .textStyle(weight: .bold, color: AllInColors.primaryTextColor, size: 17) + + Image("questionMarkGreyIcon") + .resizable() + .frame(width: 14, height: 14) + .onTapGesture { + showTitlePopover.toggle() + } + .allInPopover(isPresented: $showTitlePopover, paddingHorizontal: 20) { + "Généralement un nom commun décrivant le thème global du pari pour servir de référence." + } + + Spacer() + } + .frame(width: 340) + .padding(.leading, 10) + + TextField("", text: $theme, prompt: Text("Études, sport, soirée...") + .foregroundColor(AllInColors.lightGrey300Color) + .font(.system(size: 14)) + .fontWeight(.light)) + .padding() + .background( + RoundedRectangle(cornerRadius: 9) + .fill(AllInColors.componentBackgroundColor) + .frame(height: 40) + ) + .frame(width: 350, height: 40) + .foregroundColor(.black) + .overlay( + RoundedRectangle(cornerRadius: 10, style: .continuous) + .stroke(AllInColors.delimiterGrey, lineWidth: 1) + ) + .padding(.bottom, 5) + } + + HStack(spacing: 5) { + Text("Phrase du BET") + .textStyle(weight: .bold, color: AllInColors.primaryTextColor, size: 17) + + Image("questionMarkGreyIcon") + .resizable() + .frame(width: 14, height: 14) + .allInPopover(isPresented: $showDescriptionPopover, paddingHorizontal: 10) { + "Court descriptif du pari, souvent une question ouverte ou fermée." + } + + Spacer() + } + .frame(width: 340) + .padding(.leading, 10) + + TextField("", text: $description, prompt: Text("David sera absent Lundi matin en cours ?") + .foregroundColor(AllInColors.lightGrey300Color) + .font(.system(size: 14)) + .fontWeight(.light), axis: .vertical) + .lineLimit(4, reservesSpace: true) + .padding() + .background( + RoundedRectangle(cornerRadius: 9) + .fill(AllInColors.componentBackgroundColor) + .frame(height: 110) + ) + .frame(width: 350, height: 110) + .foregroundColor(.black) + .overlay( + RoundedRectangle(cornerRadius: 10, style: .continuous) + .stroke(AllInColors.delimiterGrey, lineWidth: 1) + ) + .padding(.bottom, 30) + + HStack(spacing: 5) { + Text("Date de fin des inscriptions") + .textStyle(weight: .bold, color: AllInColors.primaryTextColor, size: 17) + Image("questionMarkGreyIcon") + .resizable() + .frame(width: 14, height: 14) + .allInPopover(isPresented: $showRegistrationEndDatePopover) { + "Date de fin avant laquelle les joueurs peuvent s'inscrire en pariant leurs Allcoins." + } + + Spacer() + } + .frame(width: 340) + .padding(.leading, 10) + + HStack(spacing: 5) { + DatePicker( + "", + selection: $endRegisterDate, + in: dateRange, + displayedComponents: [.date, .hourAndMinute] + ) + .accentColor(AllInColors.lightPurpleColor) + .labelsHidden() + .padding(.bottom, 10) + Spacer() + } + .frame(width: 340) + + VStack(alignment: .leading, spacing: 5) { + VStack() { + HStack(spacing: 5) { + Text("Date de fin du BET") + .textStyle(weight: .bold, color: AllInColors.primaryTextColor, size: 17) + + Image("questionMarkGreyIcon") + .resizable() + .frame(width: 14, height: 14) + .allInPopover(isPresented: $showBetEndDatePopover) { + "Date des résultats où seront redistribués les Allcoins aux vainqueurs." + } + + Spacer() + } + .padding(.leading, 10) + } + DatePicker( + "", + selection: $endBetDate, + in: dateRange, + displayedComponents: [.date, .hourAndMinute] + ) + .accentColor(AllInColors.lightPurpleColor) + .labelsHidden() + .padding(.bottom, 40) + } + .frame(width: 340) + + VStack { + HStack(spacing: 5) { + Text("Confidentialité du BET") + .textStyle(weight: .bold, color: AllInColors.primaryTextColor, size: 17) + Image("questionMarkGreyIcon") + .resizable() + .frame(width: 14, height: 14) + .allInPopover(isPresented: $showConfidentialityPopover, paddingHorizontal: 15) { + "Option permettant d'ouvrir ou non le pari à des inconnus." + } + + Spacer() + } + .padding(.leading, 10) + + HStack(spacing: 5) { + ConfidentialityButton(image: "globe", text: "Public", selected: !selectedConfidentiality) + .onTapGesture { + selectedConfidentiality = false + } + .padding(.trailing, 5) + + ConfidentialityButton(image: "lock", text: "Privé", selected: selectedConfidentiality) + .onTapGesture { + selectedConfidentiality = true + } + Spacer() + } + } + .frame(width: 340) + .padding(.bottom, 10) + + + VStack(spacing: 10) { + + if self.selectedConfidentiality { + DropDownFriends() + .padding(.bottom, 30) + } + + HStack() { + Spacer() + Text("Votre BET sera visible par tous les utilisateurs.") + .textStyle(weight: .bold, color: AllInColors.veryLightPurpleColor, size: 13) + .multilineTextAlignment(.center) + Spacer() + } + HStack() { + Spacer() + Text("Tout le monde pourra rejoindre le BET.") + .textStyle(weight: .bold, color: AllInColors.veryLightPurpleColor, size: 13) + .multilineTextAlignment(.center) + Spacer() + } + HStack() { + Spacer() + Text("Vous pourrez inviter des amis à tout moment pendant la période d’inscription.") + .textStyle(weight: .bold, color: AllInColors.veryLightPurpleColor, size: 13) + .padding(.leading, 35) + .multilineTextAlignment(.center) + Spacer() + } + } + Spacer() + HStack() { + Spacer() + Button(action: {}) { + Text("Publier le bet") + .font(.system(size: 24)) + .fontWeight(.bold) + .overlay { + AllInColors.primaryGradient.frame(width: 150) + .mask( + Text("Publier le bet") + .font(.system(size: 24)) + .fontWeight(.bold) + .frame(maxWidth: .infinity) + ) + } + } + .frame(width: 335, height: 60) + .background(AllInColors.componentBackgroundColor) + .cornerRadius(12) + .overlay( + RoundedRectangle(cornerRadius: 10, style: .continuous) + .stroke(AllInColors.delimiterGrey, lineWidth: 1) + ) + Spacer() + } + } + .padding([.leading, .trailing, .bottom], 30) + .padding(.top, 50) + } + .tag(0) + + // Second Page + VStack(spacing: 5) { + + VStack() { + DropDownMenu(selectedOption: $selectedOption, options: options) + } + .padding([.bottom], 15) + .frame(width: 340) + + + Group { + switch selectedOption { + case 0: + Text("Les utilisateurs devront répondre au pari avec OUI ou NON.") + .textStyle(weight: .bold, color: AllInColors.veryLightPurpleColor, size: 13) + .padding([.leading, .trailing], 20) + + Text("Aucune autre réponse ne sera acceptée.") + .textStyle(weight: .bold, color: AllInColors.veryLightPurpleColor, size: 13) + + case 2: + Text("Vous allez renseigner les différentes réponses disponibles dans ce pari.") + .textStyle(weight: .bold, color: AllInColors.veryLightPurpleColor, size: 13) + .padding(.leading, 13) + + Text("Faites attention a etre claire et éviter toutes incertitudes") + .textStyle(weight: .bold, color: AllInColors.veryLightPurpleColor, size: 13) + .padding(.bottom, 15) + + VStack(spacing: 5) { + HStack(spacing: 0) { + TextField("", text: $response, prompt: Text("Intitulé de réponse") + .foregroundColor(AllInColors.lightGrey200Color) + .font(.system(size: 16)) + .fontWeight(.medium)) + .padding() + .background( + Rectangle() + .fill(Color.white) + .cornerRadius(9, corners: [.topLeft, .bottomLeft]) + .frame(height: 38) + ) + .frame(width: 250, height: 38) + .foregroundColor(.black) + .onChange(of: response) { newValue in + if newValue.count > 20 { + response = String(newValue.prefix(20)) + } + } + + Button(action: { + if !response.isEmpty && values.count < 5 { + values.append(response) + updateGroupedItems() + response = "" + } + }) { + Text("Ajouter") + .foregroundColor(.white) + } + .frame(width: 95, height: 40) + .background(AllInColors.lightPurpleColor) + .cornerRadius(10, corners: [.bottomRight, .topRight]) + .cornerRadius(2, corners: [.bottomLeft, .topLeft]) + } + HStack { + Spacer() + Text("encore \(5 - values.count) max.") + .textStyle(weight: .regular, color: AllInColors.primaryTextColor, size: 12) + + } + VStack(spacing: 10) { + ForEach(groupedItems, id: \.self) { items in + HStack { + ForEach(items, id: \.self) { text in + HStack { + Text(text) + .foregroundColor(.white) + .lineLimit(1) + Button(action: { + if let index = values.firstIndex(of: text) { + values.remove(at: index) + updateGroupedItems() + } + }) { + Image("crossIcon") + .resizable() + .frame(width: 15, height: 15) + .foregroundColor(.white) + } + } + .padding(5) + .padding([.leading, .trailing], 5) + .background(AllInColors.lightPurpleColor) + .cornerRadius(16) + } + Spacer() + } + } + } + } + default: + Text("En attente") + } + } + Spacer() + } + .padding([.leading, .trailing], 30) + .padding(.top, 50) + .tag(1) + } + .overlay( + HStack { + Button(action: { + selectedTab = 0 + }) { + Text("Question") + .font(.system(size: 16)) + .padding() + .fontWeight(selectedTab == 0 ? .bold : .semibold) + .foregroundColor(selectedTab == 0 ? AllInColors.primaryTextColor : .gray) + .offset(y: 0) + } + Button(action: { + selectedTab = 1 + }) { + Text("Réponses") + .font(.system(size: 16)) + .padding() + .fontWeight(selectedTab == 1 ? .bold : .semibold) + .foregroundColor(selectedTab == 1 ? AllInColors.primaryTextColor : .gray) + .offset(y: 0) + } + } + , alignment: .top) + .tabViewStyle(PageTabViewStyle()) + } + .onTapGesture { + hideKeyboard() + } + .edgesIgnoringSafeArea(.bottom) + .background(AllInColors.backgroundColor) + } +} + +struct CreationBetView_Previews: PreviewProvider { + static var previews: some View { + CreationBetView(showMenu: .constant(false)) + .preferredColorScheme(.dark) + } +} diff --git a/Sources/AllInApp/AllIn/Views/FriendsView.swift b/Sources/AllInApp/AllIn/Views/FriendsView.swift new file mode 100644 index 0000000..20f5b0e --- /dev/null +++ b/Sources/AllInApp/AllIn/Views/FriendsView.swift @@ -0,0 +1,40 @@ +// +// FriendsView.swift +// AllIn +// +// Created by Emre on 27/09/2023. +// + +import SwiftUI + +struct FriendsView: View { + + @Binding var showMenu: Bool + + var body: some View { + VStack(alignment: .center, spacing: 0) { + TopBar(showMenu: self.$showMenu) + Text("Amis") + .textStyle(weight: .bold, color: AllInColors.grey500Color, 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(AllInColors.backgroundColor) + } +} + +struct FriendsView_Previews: PreviewProvider { + static var previews: some View { + FriendsView(showMenu: .constant(false)) + } +} diff --git a/Sources/AllInApp/AllIn/Views/LoginView.swift b/Sources/AllInApp/AllIn/Views/LoginView.swift new file mode 100644 index 0000000..11d5392 --- /dev/null +++ b/Sources/AllInApp/AllIn/Views/LoginView.swift @@ -0,0 +1,150 @@ +// +// LoginView.swift +// AllIn +// +// Created by Emre on 25/09/2023. +// + +import SwiftUI + +struct LoginView: View { + + enum Field { + case email + case password + } + + @StateObject private var viewModel = LoginViewModel() + @FocusState private var focusedField: Field? + @State private var isPasswordVisible = true + @State private var username: String = "" + @State private var password: String = "" + + var body: some View { + GeometryReader { geometry in + VStack(spacing: 15) { + + Spacer() + Text("Te revoilà!") + .textStyle(weight: .semibold, color: AllInColors.darkBlueColor, size: 40) + Text("Bon retour parmis nous tu nous as manqué!") + .textStyle(weight: .regular, color: AllInColors.darkBlueColor, size: 20) + .frame(width: 220) + .multilineTextAlignment(.center) + .padding(.bottom, 60) + .submitLabel(.next) + + VStack { + if let identifierError = $viewModel.loginIdentifierFieldError.wrappedValue { + Text(identifierError) + .textStyle(weight: .bold, color: .red, size: 10) + } + TextField("", text: $viewModel.loginIdentifier, prompt: Text("Email").foregroundColor(.gray)) + .padding() + .background(Color.white.cornerRadius(9)) + .frame(width: 300) + .foregroundColor(.black) + .overlay( + RoundedRectangle(cornerRadius: 9, style: .continuous) + .stroke(AllInColors.blueGrey800Color, lineWidth: 1) + ) + .autocapitalization(.none) + .padding(.bottom, 8) + .focused($focusedField, equals: .email) + } + + VStack { + if let passwordError = $viewModel.loginPasswordFieldError.wrappedValue { + Text(passwordError) + .textStyle(weight: .bold, color: .red, size: 10) + } + Group { + if isPasswordVisible { + SecureField("", text: $viewModel.loginPassword, prompt: Text("Mot de passe").foregroundColor(.gray)) + } else { + TextField("", text: $viewModel.loginPassword, prompt: Text("Mot de passe").foregroundColor(.gray)) + .autocapitalization(.none) + } + } + .padding() + .background(Color.white.cornerRadius(9)) + .frame(width: 300) + .overlay( + RoundedRectangle(cornerRadius: 9, style: .continuous) + .stroke(AllInColors.blueGrey800Color, lineWidth: 1) + ) + .overlay( + HStack { + Spacer() + Button(action: { + isPasswordVisible.toggle() + }) { + Image(systemName: isPasswordVisible ? "eye.slash" : "eye") + .foregroundColor(.gray) + } + .padding(.trailing, 8) + } + ) + .foregroundColor(.black) + .focused($focusedField, equals: .password) + } + + Text("Mot de passe oublié?") + .textStyle(weight: .medium, color: AllInColors.darkBlueColor, size: 14) + .frame(alignment: .trailing) + .padding(.bottom, 20) + .padding(.leading, 150) + + Button(action: { + viewModel.login() + }) { + Text("Se connecter") + .textStyle(weight: .bold, color: .white, size: 17) + .frame(width: 300, height: 60) + .background(LinearGradient(gradient: + Gradient(colors:[AllInColors.pinkAccentColor,AllInColors.purpleAccentColor,AllInColors.blueAccentColor]), + startPoint: .leading, endPoint: .trailing)) + .cornerRadius(13) + } + + Spacer() + HStack(spacing: 0) { + Text("Pas encore inscrit? ") + .textStyle(weight: .regular, color: AllInColors.darkBlueColor, size: 16) + NavigationLink(destination: RegisterView().navigationBarBackButtonHidden(true)) + { + Text("S'inscrire") + .textStyle(weight: .semibold, color: AllInColors.darkPurpleColor, size: 16) + } + } + .padding(.bottom, 10) + + } + .frame(width: geometry.size.width, height: geometry.size.height) + .background(AllInColors.startBackgroundColor) + .onTapGesture { + hideKeyboard() + } + } + .alert(isPresented: $viewModel.showErrorMessage) { + Alert(title: Text("Erreur de connexion"), message: Text(viewModel.errorMessage ?? ""), dismissButton: .default(Text("OK"))) + } + .onSubmit { + switch focusedField { + case .email: + focusedField = .password + case .password: + focusedField = nil + default: + focusedField = nil + } + } + + } +} + +struct LoginView_Previews: PreviewProvider { + static var previews: some View { + LoginView() + } +} diff --git a/Sources/AllInApp/AllIn/Views/MainView.swift b/Sources/AllInApp/AllIn/Views/MainView.swift new file mode 100644 index 0000000..c7c2dd1 --- /dev/null +++ b/Sources/AllInApp/AllIn/Views/MainView.swift @@ -0,0 +1,72 @@ +// +// MainView.swift +// AllIn +// +// Created by Emre on 26/09/2023. +// + +import SwiftUI + +struct MainView: View { + + @State var showMenu = false + var page: String + + var body: some View { + + let closeDrag = DragGesture() + .onEnded { + if $0.translation.width < -100 { + withAnimation{ + self.showMenu = false + } + } + } + let openDrag = DragGesture() + .onEnded { + if $0.translation.width > 100 { + withAnimation{ + self.showMenu = true + } + } + } + + GeometryReader { geometry in + ZStack(alignment: .leading) { + Group{ + switch page { + case "Bet": + BetView(showMenu: self.$showMenu) + + case "Ranking": + RankingView(showMenu: self.$showMenu) + + case "Friends": + FriendsView(showMenu: self.$showMenu) + + case "CreationBet": + CreationBetView(showMenu: self.$showMenu) + + default: + BetView(showMenu: self.$showMenu) + } + } + .frame(width: geometry.size.width, height: geometry.size.height) + .offset(x: self.showMenu ? geometry.size.width/1.21:0) + .gesture(openDrag) + + if self.showMenu { + Menu() + .frame(width: geometry.size.width*0.83) + .transition(.move(edge: .leading)) + } + } + .gesture(closeDrag) + } + } +} +struct MainView_Previews: PreviewProvider { + static var previews: some View { + MainView(page: "Bet") + } +} diff --git a/Sources/AllInApp/AllIn/Views/RankingView.swift b/Sources/AllInApp/AllIn/Views/RankingView.swift new file mode 100644 index 0000000..916bab3 --- /dev/null +++ b/Sources/AllInApp/AllIn/Views/RankingView.swift @@ -0,0 +1,137 @@ +// +// RankingView.swift +// AllIn +// +// Created by Emre on 27/09/2023. +// + +import SwiftUI + +struct RankingView: View { + + @Binding var showMenu: Bool + + var body: some View { + GeometryReader { geometry in + VStack(alignment: .center, spacing: 0) { + TopBar(showMenu: self.$showMenu) + Text("Classement") + .textStyle(weight: .bold, color: AllInColors.grey500Color, size: 25) + .padding([.top,.bottom],15) + + HStack { + ZStack { + VStack(spacing: 0){ + Spacer() + Text("Pseudo") + .fontWeight(.bold) + .padding(.bottom, 4) + .font(.system(size: 16)) + .lineLimit(1) + Divider() + .background(AllInColors.lightGrey100Color) + HStack{ + Spacer() + Image("allcoinIcon") + .resizable() + .frame(width: 18, height: 18, alignment: .leading) + .padding([.top,.bottom],10) + Text(String("570")) + .textStyle(weight: .black, color: AllInColors.lightPurpleColor, size: 16) + .padding(.trailing, 18) + Spacer() + } + .frame(width: geometry.size.width * 0.43) + .background(AllInColors.underComponentBackgroundColor) + } + .frame(width: geometry.size.width * 0.43, height: 120) + .background(AllInColors.componentBackgroundColor) + .cornerRadius(41.5, corners: .topLeft) + .cornerRadius(8, corners: .topRight) + .cornerRadius(15, corners: [.bottomLeft, .bottomRight]) + + Image("defaultUserImage") + .resizable() + .frame(width: 70, height: 70) + .scaledToFit() + .cornerRadius(180) + .offset(x: 0, y: -55) + + Text("1") + .frame(width: 28, height: 28) + .foregroundColor(.white) + .background(AllInColors.lightPurpleColor) + .cornerRadius(30) + .font(.system(size: 18)) + .fontWeight(.bold) + .offset(x: 0, y: -23) + } + ZStack { + VStack(spacing: 0){ + Spacer() + Text("Pseudo") + .fontWeight(.bold) + .padding(.bottom, 4) + .font(.system(size: 15)) + .lineLimit(1) + Divider() + .background(AllInColors.lightGrey100Color) + HStack{ + Spacer() + Image("allcoinIcon") + .resizable() + .frame(width: 18, height: 18, alignment: .leading) + .padding([.top,.bottom],10) + Text(String("570")) + .textStyle(weight: .black, color: AllInColors.lightPurpleColor, size: 16) + .padding(.trailing, 18) + Spacer() + } + .frame(width: geometry.size.width * 0.43) + .background(AllInColors.underComponentBackgroundColor) + } + .frame(width: geometry.size.width * 0.43, height: 90) + .background(AllInColors.componentBackgroundColor) + .cornerRadius(27.5, corners: .topRight) + .cornerRadius(8, corners: .topLeft) + .cornerRadius(15, corners: [.bottomLeft, .bottomRight]) + + Image("defaultUserImage") + .resizable() + .frame(width: 60, height: 60) + .scaledToFit() + .cornerRadius(180) + .offset(x: 0, y: -50) + + Text("2") + .frame(width: 23, height: 23) + .foregroundColor(.white) + .background(AllInColors.lightPurpleColor) + .cornerRadius(30) + .font(.system(size: 15)) + .fontWeight(.bold) + .offset(x: 0, y: -22) + } + .padding(.top, 28) + + } + .padding([.leading,.trailing,.top],20) + + ScrollView(showsIndicators: false){ + VStack(spacing: 10) { + RankingRow(number: 3, image: "defaultUserImage", pseudo: "Lucas", allCoins: 541) + RankingRow(number: 4, image: "defaultUserImage", pseudo: "Arthur", allCoins: 542) + } + }.padding(.top, 10) + Spacer() + } + .edgesIgnoringSafeArea(.bottom).background(AllInColors.backgroundColor) + } + } +} + +struct RankingView_Previews: PreviewProvider { + static var previews: some View { + RankingView(showMenu: .constant(false)) + } +} diff --git a/Sources/AllInApp/AllIn/Views/RegisterView.swift b/Sources/AllInApp/AllIn/Views/RegisterView.swift new file mode 100644 index 0000000..32e32e1 --- /dev/null +++ b/Sources/AllInApp/AllIn/Views/RegisterView.swift @@ -0,0 +1,244 @@ +// +// RegisterView.swift +// AllIn +// +// Created by Emre on 25/09/2023. +// + +import SwiftUI + +struct RegisterView: View { + + enum Field { + case username + case email + case password + case passwordConfirm + } + + @StateObject private var viewModel = RegisterViewModel() + @FocusState private var focusedField: Field? + @State private var isPasswordVisible = true + + var body: some View { + GeometryReader { geometry in + ScrollView(showsIndicators: false) { + VStack(spacing: 15) { + Spacer() + VStack { + if !viewModel.registerUsername.isEmpty { + Text("Bonjour " + viewModel.registerUsername + ",") + .textStyle(weight: .semibold, color: AllInColors.darkBlueColor, size: 40) + .padding([.trailing, .leading], 30) + } else { + Text("Bonjour,") + .textStyle(weight: .semibold, color: AllInColors.darkBlueColor, size: 40) + } + Text("On a besoin de ça!") + .textStyle(weight: .semibold, color: AllInColors.darkBlueColor, size: 40) + } + + Text("Promis c’est rapide.") + .textStyle(weight: .regular, color: AllInColors.darkBlueColor, size: 20) + .frame(width: 220) + .multilineTextAlignment(.center) + .padding(.bottom, 60) + + VStack { + if let usernameError = $viewModel.registerUsernameFieldError.wrappedValue { + Text(usernameError) + .textStyle(weight: .bold, color: .red, size: 10) + } + TextField("", text: $viewModel.registerUsername, prompt: Text("Pseudo").foregroundColor(.gray)) + .padding() + .background(Color.white.cornerRadius(9)) + .frame(width: 300) + .foregroundColor(.black) + .overlay( + RoundedRectangle(cornerRadius: 9, style: .continuous) + .stroke(AllInColors.blueGrey800Color, lineWidth: 1) + ) + .padding(.bottom, 8) + .onChange(of: viewModel.registerUsername, perform: { value in + guard value != viewModel.registerUsername else { return } + if value.count > 25 { + viewModel.registerUsername = String(value.prefix(25)) + } + }) + .focused($focusedField, equals: .username) + .submitLabel(.next) + } + + VStack { + if let emailError = $viewModel.registerEmailFieldError.wrappedValue { + Text(emailError) + .textStyle(weight: .bold, color: .red, size: 10) + } + TextField("", text: $viewModel.registerEmail, prompt: Text("Email").foregroundColor(.gray)) + .padding() + .keyboardType(.emailAddress) + .background(Color.white.cornerRadius(9)) + .frame(width: 300) + .foregroundColor(.black) + .overlay( + RoundedRectangle(cornerRadius: 9, style: .continuous) + .stroke(AllInColors.blueGrey800Color, lineWidth: 1) + ) + .padding(.bottom, 8) + .onChange(of: viewModel.registerEmail, perform: { value in + guard value != viewModel.registerEmail else { return } + if value.count > 50 { + viewModel.registerEmail = String(value.prefix(50)) + } + }) + .focused($focusedField, equals: .email) + .textContentType(.emailAddress) + .submitLabel(.next) + } + + VStack { + if let passwordError = $viewModel.registerPasswordFieldError.wrappedValue { + Text(passwordError) + .font(.system(size: 10)) + .foregroundColor(.red) + .fontWeight(.bold) + } + Group { + if isPasswordVisible { + SecureField("", text: $viewModel.registerPassword, prompt: Text("Mot de passe").foregroundColor(.gray)) + } else { + TextField("", text: $viewModel.registerPassword, prompt: Text("Mot de passe").foregroundColor(.gray)) + .autocapitalization(.none) + } + } + .padding() + .background(Color.white.cornerRadius(9)) + .frame(width: 300) + .overlay( + RoundedRectangle(cornerRadius: 9, style: .continuous) + .stroke(AllInColors.blueGrey800Color, lineWidth: 1) + ) + .foregroundColor(.black) + .padding(.bottom, 8) + .overlay( + HStack { + Spacer() + Button(action: { + isPasswordVisible.toggle() + }) { + Image(systemName: isPasswordVisible ? "eye.slash" : "eye") + .foregroundColor(.gray) + } + .padding(.bottom, 8) + .padding(.trailing, 8) + } + ) + .focused($focusedField, equals: .password) + } + + VStack { + if let passwordConfirmError = $viewModel.registerConfirmPasswordFieldError.wrappedValue { + Text(passwordConfirmError) + .font(.system(size: 10)) + .foregroundColor(.red) + .fontWeight(.bold) + } + + Group { + if isPasswordVisible { + SecureField("", text: $viewModel.registerConfirmPassword, prompt: Text("Confirmation du Mot de passe").foregroundColor(.gray)) + } else { + TextField("", text: $viewModel.registerConfirmPassword, prompt: Text("Confirmation du Mot de passe").foregroundColor(.gray)) + .autocapitalization(.none) + } + } + .padding() + .background(Color.white.cornerRadius(9)) + .frame(width: 300) + .overlay( + RoundedRectangle(cornerRadius: 9, style: .continuous) + .stroke(AllInColors.blueGrey800Color, lineWidth: 1) + ) + .overlay( + HStack { + Spacer() + Button(action: { + isPasswordVisible.toggle() + }) { + Image(systemName: isPasswordVisible ? "eye.slash" : "eye") + .foregroundColor(.gray) + } + .padding(.trailing, 8) + } + ) + .foregroundColor(.black) + .padding(.bottom, 50) + .focused($focusedField, equals: .passwordConfirm) + .submitLabel(.next) + } + + Button(action: { + viewModel.register() + }) { + Text("S'inscrire") + .textStyle(weight: .bold, color: .white, size: 17) + + .frame(width: 300, height: 60) + .background(LinearGradient(gradient: + Gradient(colors:[AllInColors.pinkAccentColor,AllInColors.purpleAccentColor,AllInColors.blueAccentColor]), + startPoint: .bottomLeading, endPoint: .topTrailing)) + .background( + .opacity(0) + ) + .cornerRadius(13) + } + + Spacer() + + HStack(spacing: 0) { + Text("Tu as déjà un compte? ") + .textStyle(weight: .regular, color: AllInColors.darkBlueColor, size: 16) + + NavigationLink(destination: LoginView().navigationBarBackButtonHidden(true)) + { + Text("Se connecter") + .textStyle(weight: .semibold, color: AllInColors.darkPurpleColor, size: 16) + } + } + .padding(.bottom, 10) + + } + .frame(minWidth: geometry.size.width, minHeight: geometry.size.height) + .onTapGesture { + hideKeyboard() + } + + } + .alert(isPresented: $viewModel.showErrorMessage) { + Alert(title: Text("Erreur lors de l'enregistrement"), message: Text(viewModel.errorMessage ?? ""), dismissButton: .default(Text("OK"))) + } + .background(AllInColors.startBackgroundColor) + .onSubmit { + switch focusedField { + case .username: + focusedField = .email + case .email: + focusedField = .password + case .password: + focusedField = .passwordConfirm + case .passwordConfirm: + focusedField = nil + default: + focusedField = nil + } + } + } + } +} + +struct RegisterView_Previews: PreviewProvider { + static var previews: some View { + RegisterView() + .preferredColorScheme(.dark) + } +} diff --git a/Sources/AllInApp/AllIn/Views/SplashView.swift b/Sources/AllInApp/AllIn/Views/SplashView.swift new file mode 100644 index 0000000..730e3aa --- /dev/null +++ b/Sources/AllInApp/AllIn/Views/SplashView.swift @@ -0,0 +1,31 @@ +// +// SplashView.swift +// AllIn +// +// Created by Emre on 23/09/2023. +// + +import SwiftUI + +struct SplashView: View { + var body: some View { + ZStack { + LinearGradient( + gradient: Gradient(colors: [AllInColors.pinkAccentColor, AllInColors.purpleAccentColor, AllInColors.lightBlueAccentColor]), + startPoint: .bottomLeading, + endPoint: .topTrailing + ) + .edgesIgnoringSafeArea(.all) + + Image("allinIcon") + .resizable() + .frame(width: 80, height: 80) + } + } +} + +struct SplashView_Previews: PreviewProvider { + static var previews: some View { + SplashView() + } +} diff --git a/Sources/AllInApp/AllIn/Views/WelcomeView.swift b/Sources/AllInApp/AllIn/Views/WelcomeView.swift new file mode 100644 index 0000000..768683f --- /dev/null +++ b/Sources/AllInApp/AllIn/Views/WelcomeView.swift @@ -0,0 +1,106 @@ +// +// WelcomeView.swift +// AllIn +// +// Created by Emre on 23/09/2023. +// + +import SwiftUI + +struct WelcomeView: View { + var body: some View { + GeometryReader { geometry in + VStack(alignment: .leading, spacing: 0) { + Spacer() + VStack(alignment: .leading, spacing: -5) { + Spacer() + Spacer() + Text("Bienvenue sur,") + .textStyle(weight: .bold, color: AllInColors.darkBlueColor, size: 30) + .frame(alignment: .topLeading) + .frame(width: geometry.size.width, alignment: .topLeading) + + Text("Allin") + .font(.system(size: 45).bold()) + .foregroundStyle(LinearGradient( + colors: [AllInColors.pinkAccentColor, AllInColors.blueAccentColor], + startPoint: .bottomLeading, + endPoint: .topTrailing + )) + .padding(.bottom, 40) + } + .padding([.leading], geometry.size.width*0.2) + .frame(width: geometry.size.width, height: 320) + .background( LinearGradient( + stops: [ + Gradient.Stop(color: AllInColors.startBackgroundColor.opacity(0), location: 0.00), + Gradient.Stop(color: AllInColors.startBackgroundColor.opacity(0.01), location: 0.07), + Gradient.Stop(color: AllInColors.startBackgroundColor.opacity(0.04), location: 0.13), + Gradient.Stop(color: AllInColors.startBackgroundColor.opacity(0.08), location: 0.20), + Gradient.Stop(color: AllInColors.startBackgroundColor.opacity(0.15), location: 0.27), + Gradient.Stop(color: AllInColors.startBackgroundColor.opacity(0.23), location: 0.33), + Gradient.Stop(color: AllInColors.startBackgroundColor.opacity(0.33), location: 0.40), + Gradient.Stop(color: AllInColors.startBackgroundColor.opacity(0.44), location: 0.47), + Gradient.Stop(color: AllInColors.startBackgroundColor.opacity(0.56), location: 0.53), + Gradient.Stop(color: AllInColors.startBackgroundColor.opacity(0.67), location: 0.60), + Gradient.Stop(color: AllInColors.startBackgroundColor.opacity(0.77), location: 0.67), + Gradient.Stop(color: AllInColors.startBackgroundColor.opacity(0.85), location: 0.73), + Gradient.Stop(color: AllInColors.startBackgroundColor.opacity(0.92), location: 0.80), + Gradient.Stop(color: AllInColors.startBackgroundColor.opacity(0.96), location: 0.87), + Gradient.Stop(color: AllInColors.startBackgroundColor.opacity(0.99), location: 0.93), + Gradient.Stop(color: AllInColors.startBackgroundColor, location: 1.00), + ], + startPoint: UnitPoint(x: 0.5, y: 0), + endPoint: UnitPoint(x: 0.5, y: 0.85) + )) + VStack() { + Text("Récupère tes Allcoins et vient parier avec tes amis pour prouver qui est le meilleur.") + .textStyle(weight: .regular, color: AllInColors.darkBlueColor, size: 15) + .frame(width: geometry.size.width*0.8, alignment: .leading) + .padding([.leading,.trailing], 40) + + Spacer() + Spacer() + + NavigationLink(destination: RegisterView().navigationBarBackButtonHidden(true)) + { + Text("Rejoindre") + .textStyle(weight: .bold, color: AllInColors.whiteColor, size: 17) + .frame(width: min(geometry.size.width*0.85, 500), height: 50) + .background(AllInColors.loginPurpleColor) + .cornerRadius(30) + } + + HStack(spacing: 0) { + Text("Tu as déja un compte? ") + .textStyle(weight: .regular, color: AllInColors.loginPurpleColor, size: 16) + + NavigationLink(destination: LoginView().navigationBarBackButtonHidden(true)) + { + Text("Connexion") + .textStyle(weight: .semibold, color: AllInColors.loginPurpleColor, size: 16) + .underline() + } + } + Spacer() + } + .frame(width: geometry.size.width, height: geometry.size.height/3.5) + .background(AllInColors.startBackgroundColor) + } + .frame(width: geometry.size.width, height: geometry.size.height) + .background( + Image("welcomeBackgroundImage") + .resizable() + ) + .edgesIgnoringSafeArea(.all) + + } + .background(AllInColors.startBackgroundColor) + } +} + +struct WelcomeView_Previews: PreviewProvider { + static var previews: some View { + WelcomeView() + } +} diff --git a/Sources/AllInApp/AllInApp.xcodeproj/project.pbxproj b/Sources/AllInApp/AllInApp.xcodeproj/project.pbxproj new file mode 100644 index 0000000..a726e81 --- /dev/null +++ b/Sources/AllInApp/AllInApp.xcodeproj/project.pbxproj @@ -0,0 +1,804 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + EC0193782B25BF16005D81E6 /* AllcoinsCapsule.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC0193772B25BF16005D81E6 /* AllcoinsCapsule.swift */; }; + EC01937A2B25C12B005D81E6 /* BetCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC0193792B25C12B005D81E6 /* BetCard.swift */; }; + EC01937C2B25C2A8005D81E6 /* AllcoinsCounter.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC01937B2B25C2A8005D81E6 /* AllcoinsCounter.swift */; }; + EC01937E2B25C52E005D81E6 /* TopBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC01937D2B25C52E005D81E6 /* TopBar.swift */; }; + EC3077072B24CB840060E34D /* SplashView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC3077062B24CB840060E34D /* SplashView.swift */; }; + EC3077092B24CF7F0060E34D /* Colors.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC3077082B24CF7F0060E34D /* Colors.swift */; }; + EC30770B2B24D9160060E34D /* WelcomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC30770A2B24D9160060E34D /* WelcomeView.swift */; }; + EC30770D2B24DB7A0060E34D /* Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC30770C2B24DB7A0060E34D /* Extensions.swift */; }; + EC30770F2B24FCB00060E34D /* RegisterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC30770E2B24FCB00060E34D /* RegisterView.swift */; }; + EC650A422B25C817003AFCAD /* Friend.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC650A412B25C817003AFCAD /* Friend.swift */; }; + EC650A442B25CDF3003AFCAD /* ParameterMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC650A432B25CDF3003AFCAD /* ParameterMenu.swift */; }; + EC650A462B25D686003AFCAD /* RankingRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC650A452B25D686003AFCAD /* RankingRow.swift */; }; + EC650A482B25DCFF003AFCAD /* UsersPreview.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC650A472B25DCFF003AFCAD /* UsersPreview.swift */; }; + EC650A4A2B25DD58003AFCAD /* FriendsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC650A492B25DD58003AFCAD /* FriendsView.swift */; }; + EC650A4C2B25E9C7003AFCAD /* RankingView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC650A4B2B25E9C7003AFCAD /* RankingView.swift */; }; + EC650A4E2B278EDB003AFCAD /* TrendingBetCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC650A4D2B278EDB003AFCAD /* TrendingBetCard.swift */; }; + EC650A502B2793D5003AFCAD /* TextCapsule.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC650A4F2B2793D5003AFCAD /* TextCapsule.swift */; }; + EC650A522B2794DD003AFCAD /* BetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC650A512B2794DD003AFCAD /* BetView.swift */; }; + EC650A542B279545003AFCAD /* ChoiceCapsule.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC650A532B279545003AFCAD /* ChoiceCapsule.swift */; }; + EC650A562B279D68003AFCAD /* WinModal.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC650A552B279D68003AFCAD /* WinModal.swift */; }; + EC650A582B279D9D003AFCAD /* RecapBetCard.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC650A572B279D9D003AFCAD /* RecapBetCard.swift */; }; + EC650A622B28CB72003AFCAD /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = EC650A612B28CB72003AFCAD /* Launch Screen.storyboard */; }; + EC6B969C2B24B4CC00FC1C58 /* AllInApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC6B969B2B24B4CC00FC1C58 /* AllInApp.swift */; }; + EC6B969E2B24B4CC00FC1C58 /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC6B969D2B24B4CC00FC1C58 /* ContentView.swift */; }; + EC6B96A02B24B4CC00FC1C58 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EC6B969F2B24B4CC00FC1C58 /* Assets.xcassets */; }; + EC6B96A32B24B4CC00FC1C58 /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = EC6B96A22B24B4CC00FC1C58 /* Preview Assets.xcassets */; }; + EC6B96AD2B24B4CC00FC1C58 /* AllInTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC6B96AC2B24B4CC00FC1C58 /* AllInTests.swift */; }; + EC6B96B72B24B4CC00FC1C58 /* AllInUITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC6B96B62B24B4CC00FC1C58 /* AllInUITests.swift */; }; + EC6B96B92B24B4CC00FC1C58 /* AllInUITestsLaunchTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC6B96B82B24B4CC00FC1C58 /* AllInUITestsLaunchTests.swift */; }; + EC6B96C72B24B5A100FC1C58 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC6B96C62B24B5A100FC1C58 /* User.swift */; }; + EC6B96C92B24B69B00FC1C58 /* DependancyInjection.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC6B96C82B24B69B00FC1C58 /* DependancyInjection.swift */; }; + EC6B96CC2B24B7E500FC1C58 /* IAuthService.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC6B96CB2B24B7E500FC1C58 /* IAuthService.swift */; }; + EC6B96CF2B24B8D900FC1C58 /* Config.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC6B96CE2B24B8D900FC1C58 /* Config.swift */; }; + EC6B96D12B24BAE800FC1C58 /* AuthService.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC6B96D02B24BAE800FC1C58 /* AuthService.swift */; }; + EC6B96D52B24BE0E00FC1C58 /* MainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC6B96D42B24BE0E00FC1C58 /* MainView.swift */; }; + EC6B96D82B24BF2100FC1C58 /* Menu.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC6B96D72B24BF2100FC1C58 /* Menu.swift */; }; + EC7A882B2B28D1E0004F226A /* DropDownMenu.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC7A882A2B28D1E0004F226A /* DropDownMenu.swift */; }; + EC7A882D2B28D8A1004F226A /* CreationBetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC7A882C2B28D8A1004F226A /* CreationBetView.swift */; }; + EC7A882F2B28E6BE004F226A /* ConfidentialityButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC7A882E2B28E6BE004F226A /* ConfidentialityButton.swift */; }; + EC89F7BD2B250D66003821CE /* LoginView.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC89F7BC2B250D66003821CE /* LoginView.swift */; }; + ECA9D1C92B2D9ADA0076E0EC /* UserInfo.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECA9D1C82B2D9ADA0076E0EC /* UserInfo.swift */; }; + ECA9D1CB2B2DA2320076E0EC /* DropDownFriends.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECA9D1CA2B2DA2320076E0EC /* DropDownFriends.swift */; }; + ECB7BC682B2F1ADF002A6654 /* LoginViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB7BC672B2F1ADF002A6654 /* LoginViewModel.swift */; }; + ECB7BC6A2B2F410A002A6654 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB7BC692B2F410A002A6654 /* AppDelegate.swift */; }; + ECB7BC6C2B2F43EE002A6654 /* AppState.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB7BC6B2B2F43EE002A6654 /* AppState.swift */; }; + ECB7BC702B336E28002A6654 /* RegisterViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = ECB7BC6F2B336E28002A6654 /* RegisterViewModel.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + EC6B96A92B24B4CC00FC1C58 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = EC6B96902B24B4CC00FC1C58 /* Project object */; + proxyType = 1; + remoteGlobalIDString = EC6B96972B24B4CC00FC1C58; + remoteInfo = AllIn; + }; + EC6B96B32B24B4CC00FC1C58 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = EC6B96902B24B4CC00FC1C58 /* Project object */; + proxyType = 1; + remoteGlobalIDString = EC6B96972B24B4CC00FC1C58; + remoteInfo = AllIn; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + EC0193772B25BF16005D81E6 /* AllcoinsCapsule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllcoinsCapsule.swift; sourceTree = ""; }; + EC0193792B25C12B005D81E6 /* BetCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BetCard.swift; sourceTree = ""; }; + EC01937B2B25C2A8005D81E6 /* AllcoinsCounter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllcoinsCounter.swift; sourceTree = ""; }; + EC01937D2B25C52E005D81E6 /* TopBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TopBar.swift; sourceTree = ""; }; + EC3077062B24CB840060E34D /* SplashView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SplashView.swift; sourceTree = ""; }; + EC3077082B24CF7F0060E34D /* Colors.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Colors.swift; sourceTree = ""; }; + EC30770A2B24D9160060E34D /* WelcomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WelcomeView.swift; sourceTree = ""; }; + EC30770C2B24DB7A0060E34D /* Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Extensions.swift; sourceTree = ""; }; + EC30770E2B24FCB00060E34D /* RegisterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegisterView.swift; sourceTree = ""; }; + EC650A412B25C817003AFCAD /* Friend.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Friend.swift; sourceTree = ""; }; + EC650A432B25CDF3003AFCAD /* ParameterMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParameterMenu.swift; sourceTree = ""; }; + EC650A452B25D686003AFCAD /* RankingRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RankingRow.swift; sourceTree = ""; }; + EC650A472B25DCFF003AFCAD /* UsersPreview.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UsersPreview.swift; sourceTree = ""; }; + EC650A492B25DD58003AFCAD /* FriendsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FriendsView.swift; sourceTree = ""; }; + EC650A4B2B25E9C7003AFCAD /* RankingView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RankingView.swift; sourceTree = ""; }; + EC650A4D2B278EDB003AFCAD /* TrendingBetCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrendingBetCard.swift; sourceTree = ""; }; + EC650A4F2B2793D5003AFCAD /* TextCapsule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TextCapsule.swift; sourceTree = ""; }; + EC650A512B2794DD003AFCAD /* BetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BetView.swift; sourceTree = ""; }; + EC650A532B279545003AFCAD /* ChoiceCapsule.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChoiceCapsule.swift; sourceTree = ""; }; + EC650A552B279D68003AFCAD /* WinModal.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WinModal.swift; sourceTree = ""; }; + EC650A572B279D9D003AFCAD /* RecapBetCard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecapBetCard.swift; sourceTree = ""; }; + EC650A612B28CB72003AFCAD /* Launch Screen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = ""; }; + EC6B96982B24B4CC00FC1C58 /* AllIn.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AllIn.app; sourceTree = BUILT_PRODUCTS_DIR; }; + EC6B969B2B24B4CC00FC1C58 /* AllInApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllInApp.swift; sourceTree = ""; }; + EC6B969D2B24B4CC00FC1C58 /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + EC6B969F2B24B4CC00FC1C58 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + EC6B96A22B24B4CC00FC1C58 /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + EC6B96A82B24B4CC00FC1C58 /* AllInTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AllInTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + EC6B96AC2B24B4CC00FC1C58 /* AllInTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllInTests.swift; sourceTree = ""; }; + EC6B96B22B24B4CC00FC1C58 /* AllInUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AllInUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + EC6B96B62B24B4CC00FC1C58 /* AllInUITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllInUITests.swift; sourceTree = ""; }; + EC6B96B82B24B4CC00FC1C58 /* AllInUITestsLaunchTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AllInUITestsLaunchTests.swift; sourceTree = ""; }; + EC6B96C62B24B5A100FC1C58 /* User.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; + EC6B96C82B24B69B00FC1C58 /* DependancyInjection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DependancyInjection.swift; sourceTree = ""; }; + EC6B96CB2B24B7E500FC1C58 /* IAuthService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IAuthService.swift; sourceTree = ""; }; + EC6B96CE2B24B8D900FC1C58 /* Config.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Config.swift; sourceTree = ""; }; + EC6B96D02B24BAE800FC1C58 /* AuthService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthService.swift; sourceTree = ""; }; + EC6B96D42B24BE0E00FC1C58 /* MainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainView.swift; sourceTree = ""; }; + EC6B96D72B24BF2100FC1C58 /* Menu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Menu.swift; sourceTree = ""; }; + EC7A882A2B28D1E0004F226A /* DropDownMenu.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DropDownMenu.swift; sourceTree = ""; }; + EC7A882C2B28D8A1004F226A /* CreationBetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CreationBetView.swift; sourceTree = ""; }; + EC7A882E2B28E6BE004F226A /* ConfidentialityButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfidentialityButton.swift; sourceTree = ""; }; + EC89F7BC2B250D66003821CE /* LoginView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginView.swift; sourceTree = ""; }; + ECA9D1C82B2D9ADA0076E0EC /* UserInfo.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserInfo.swift; sourceTree = ""; }; + ECA9D1CA2B2DA2320076E0EC /* DropDownFriends.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DropDownFriends.swift; sourceTree = ""; }; + ECB7BC672B2F1ADF002A6654 /* LoginViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LoginViewModel.swift; sourceTree = ""; }; + ECB7BC692B2F410A002A6654 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + ECB7BC6B2B2F43EE002A6654 /* AppState.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppState.swift; sourceTree = ""; }; + ECB7BC6F2B336E28002A6654 /* RegisterViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RegisterViewModel.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + EC6B96952B24B4CC00FC1C58 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EC6B96A52B24B4CC00FC1C58 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EC6B96AF2B24B4CC00FC1C58 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + EC6B968F2B24B4CC00FC1C58 = { + isa = PBXGroup; + children = ( + EC6B969A2B24B4CC00FC1C58 /* AllIn */, + EC6B96AB2B24B4CC00FC1C58 /* AllInTests */, + EC6B96B52B24B4CC00FC1C58 /* AllInUITests */, + EC6B96992B24B4CC00FC1C58 /* Products */, + ); + sourceTree = ""; + }; + EC6B96992B24B4CC00FC1C58 /* Products */ = { + isa = PBXGroup; + children = ( + EC6B96982B24B4CC00FC1C58 /* AllIn.app */, + EC6B96A82B24B4CC00FC1C58 /* AllInTests.xctest */, + EC6B96B22B24B4CC00FC1C58 /* AllInUITests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + EC6B969A2B24B4CC00FC1C58 /* AllIn */ = { + isa = PBXGroup; + children = ( + ECB7BC662B2F1AAD002A6654 /* ViewModels */, + EC6B96D62B24BEBD00FC1C58 /* Components */, + EC6B96D32B24BC6700FC1C58 /* Views */, + EC6B96D22B24BC4F00FC1C58 /* Extensions */, + EC6B96CD2B24B8A300FC1C58 /* Ressources */, + EC6B96CA2B24B7B300FC1C58 /* Services */, + EC6B96C52B24B58700FC1C58 /* Models */, + EC6B969B2B24B4CC00FC1C58 /* AllInApp.swift */, + EC6B969D2B24B4CC00FC1C58 /* ContentView.swift */, + EC6B969F2B24B4CC00FC1C58 /* Assets.xcassets */, + EC6B96A12B24B4CC00FC1C58 /* Preview Content */, + EC650A612B28CB72003AFCAD /* Launch Screen.storyboard */, + ECB7BC692B2F410A002A6654 /* AppDelegate.swift */, + ECB7BC6B2B2F43EE002A6654 /* AppState.swift */, + ); + path = AllIn; + sourceTree = ""; + }; + EC6B96A12B24B4CC00FC1C58 /* Preview Content */ = { + isa = PBXGroup; + children = ( + EC6B96A22B24B4CC00FC1C58 /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + EC6B96AB2B24B4CC00FC1C58 /* AllInTests */ = { + isa = PBXGroup; + children = ( + EC6B96AC2B24B4CC00FC1C58 /* AllInTests.swift */, + ); + path = AllInTests; + sourceTree = ""; + }; + EC6B96B52B24B4CC00FC1C58 /* AllInUITests */ = { + isa = PBXGroup; + children = ( + EC6B96B62B24B4CC00FC1C58 /* AllInUITests.swift */, + EC6B96B82B24B4CC00FC1C58 /* AllInUITestsLaunchTests.swift */, + ); + path = AllInUITests; + sourceTree = ""; + }; + EC6B96C52B24B58700FC1C58 /* Models */ = { + isa = PBXGroup; + children = ( + EC6B96C62B24B5A100FC1C58 /* User.swift */, + EC6B96C82B24B69B00FC1C58 /* DependancyInjection.swift */, + ); + path = Models; + sourceTree = ""; + }; + EC6B96CA2B24B7B300FC1C58 /* Services */ = { + isa = PBXGroup; + children = ( + EC6B96CB2B24B7E500FC1C58 /* IAuthService.swift */, + EC6B96D02B24BAE800FC1C58 /* AuthService.swift */, + ); + path = Services; + sourceTree = ""; + }; + EC6B96CD2B24B8A300FC1C58 /* Ressources */ = { + isa = PBXGroup; + children = ( + EC6B96CE2B24B8D900FC1C58 /* Config.swift */, + EC3077082B24CF7F0060E34D /* Colors.swift */, + ); + path = Ressources; + sourceTree = ""; + }; + EC6B96D22B24BC4F00FC1C58 /* Extensions */ = { + isa = PBXGroup; + children = ( + EC30770C2B24DB7A0060E34D /* Extensions.swift */, + ); + path = Extensions; + sourceTree = ""; + }; + EC6B96D32B24BC6700FC1C58 /* Views */ = { + isa = PBXGroup; + children = ( + EC6B96D42B24BE0E00FC1C58 /* MainView.swift */, + EC3077062B24CB840060E34D /* SplashView.swift */, + EC30770A2B24D9160060E34D /* WelcomeView.swift */, + EC30770E2B24FCB00060E34D /* RegisterView.swift */, + EC89F7BC2B250D66003821CE /* LoginView.swift */, + EC650A492B25DD58003AFCAD /* FriendsView.swift */, + EC650A4B2B25E9C7003AFCAD /* RankingView.swift */, + EC650A512B2794DD003AFCAD /* BetView.swift */, + EC7A882C2B28D8A1004F226A /* CreationBetView.swift */, + ); + path = Views; + sourceTree = ""; + }; + EC6B96D62B24BEBD00FC1C58 /* Components */ = { + isa = PBXGroup; + children = ( + EC6B96D72B24BF2100FC1C58 /* Menu.swift */, + EC0193772B25BF16005D81E6 /* AllcoinsCapsule.swift */, + EC0193792B25C12B005D81E6 /* BetCard.swift */, + EC01937B2B25C2A8005D81E6 /* AllcoinsCounter.swift */, + EC01937D2B25C52E005D81E6 /* TopBar.swift */, + EC650A412B25C817003AFCAD /* Friend.swift */, + EC650A432B25CDF3003AFCAD /* ParameterMenu.swift */, + EC650A452B25D686003AFCAD /* RankingRow.swift */, + EC650A472B25DCFF003AFCAD /* UsersPreview.swift */, + EC650A4D2B278EDB003AFCAD /* TrendingBetCard.swift */, + EC650A4F2B2793D5003AFCAD /* TextCapsule.swift */, + EC650A532B279545003AFCAD /* ChoiceCapsule.swift */, + EC650A552B279D68003AFCAD /* WinModal.swift */, + EC650A572B279D9D003AFCAD /* RecapBetCard.swift */, + EC7A882A2B28D1E0004F226A /* DropDownMenu.swift */, + EC7A882E2B28E6BE004F226A /* ConfidentialityButton.swift */, + ECA9D1C82B2D9ADA0076E0EC /* UserInfo.swift */, + ECA9D1CA2B2DA2320076E0EC /* DropDownFriends.swift */, + ); + path = Components; + sourceTree = ""; + }; + ECB7BC662B2F1AAD002A6654 /* ViewModels */ = { + isa = PBXGroup; + children = ( + ECB7BC672B2F1ADF002A6654 /* LoginViewModel.swift */, + ECB7BC6F2B336E28002A6654 /* RegisterViewModel.swift */, + ); + path = ViewModels; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + EC6B96972B24B4CC00FC1C58 /* AllIn */ = { + isa = PBXNativeTarget; + buildConfigurationList = EC6B96BC2B24B4CC00FC1C58 /* Build configuration list for PBXNativeTarget "AllIn" */; + buildPhases = ( + EC6B96942B24B4CC00FC1C58 /* Sources */, + EC6B96952B24B4CC00FC1C58 /* Frameworks */, + EC6B96962B24B4CC00FC1C58 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = AllIn; + packageProductDependencies = ( + ); + productName = AllIn; + productReference = EC6B96982B24B4CC00FC1C58 /* AllIn.app */; + productType = "com.apple.product-type.application"; + }; + EC6B96A72B24B4CC00FC1C58 /* AllInTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = EC6B96BF2B24B4CC00FC1C58 /* Build configuration list for PBXNativeTarget "AllInTests" */; + buildPhases = ( + EC6B96A42B24B4CC00FC1C58 /* Sources */, + EC6B96A52B24B4CC00FC1C58 /* Frameworks */, + EC6B96A62B24B4CC00FC1C58 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + EC6B96AA2B24B4CC00FC1C58 /* PBXTargetDependency */, + ); + name = AllInTests; + productName = AllInTests; + productReference = EC6B96A82B24B4CC00FC1C58 /* AllInTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + EC6B96B12B24B4CC00FC1C58 /* AllInUITests */ = { + isa = PBXNativeTarget; + buildConfigurationList = EC6B96C22B24B4CC00FC1C58 /* Build configuration list for PBXNativeTarget "AllInUITests" */; + buildPhases = ( + EC6B96AE2B24B4CC00FC1C58 /* Sources */, + EC6B96AF2B24B4CC00FC1C58 /* Frameworks */, + EC6B96B02B24B4CC00FC1C58 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + EC6B96B42B24B4CC00FC1C58 /* PBXTargetDependency */, + ); + name = AllInUITests; + productName = AllInUITests; + productReference = EC6B96B22B24B4CC00FC1C58 /* AllInUITests.xctest */; + productType = "com.apple.product-type.bundle.ui-testing"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + EC6B96902B24B4CC00FC1C58 /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1430; + LastUpgradeCheck = 1430; + TargetAttributes = { + EC6B96972B24B4CC00FC1C58 = { + CreatedOnToolsVersion = 14.3.1; + }; + EC6B96A72B24B4CC00FC1C58 = { + CreatedOnToolsVersion = 14.3.1; + TestTargetID = EC6B96972B24B4CC00FC1C58; + }; + EC6B96B12B24B4CC00FC1C58 = { + CreatedOnToolsVersion = 14.3.1; + TestTargetID = EC6B96972B24B4CC00FC1C58; + }; + }; + }; + buildConfigurationList = EC6B96932B24B4CC00FC1C58 /* Build configuration list for PBXProject "AllInApp" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = EC6B968F2B24B4CC00FC1C58; + packageReferences = ( + ); + productRefGroup = EC6B96992B24B4CC00FC1C58 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + EC6B96972B24B4CC00FC1C58 /* AllIn */, + EC6B96A72B24B4CC00FC1C58 /* AllInTests */, + EC6B96B12B24B4CC00FC1C58 /* AllInUITests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + EC6B96962B24B4CC00FC1C58 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EC650A622B28CB72003AFCAD /* Launch Screen.storyboard in Resources */, + EC6B96A32B24B4CC00FC1C58 /* Preview Assets.xcassets in Resources */, + EC6B96A02B24B4CC00FC1C58 /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EC6B96A62B24B4CC00FC1C58 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EC6B96B02B24B4CC00FC1C58 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + EC6B96942B24B4CC00FC1C58 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EC6B96CC2B24B7E500FC1C58 /* IAuthService.swift in Sources */, + EC3077092B24CF7F0060E34D /* Colors.swift in Sources */, + ECB7BC6A2B2F410A002A6654 /* AppDelegate.swift in Sources */, + EC6B969E2B24B4CC00FC1C58 /* ContentView.swift in Sources */, + EC89F7BD2B250D66003821CE /* LoginView.swift in Sources */, + EC650A442B25CDF3003AFCAD /* ParameterMenu.swift in Sources */, + EC30770F2B24FCB00060E34D /* RegisterView.swift in Sources */, + EC650A522B2794DD003AFCAD /* BetView.swift in Sources */, + EC6B969C2B24B4CC00FC1C58 /* AllInApp.swift in Sources */, + EC650A502B2793D5003AFCAD /* TextCapsule.swift in Sources */, + EC650A482B25DCFF003AFCAD /* UsersPreview.swift in Sources */, + EC650A462B25D686003AFCAD /* RankingRow.swift in Sources */, + EC01937A2B25C12B005D81E6 /* BetCard.swift in Sources */, + EC650A422B25C817003AFCAD /* Friend.swift in Sources */, + EC6B96C92B24B69B00FC1C58 /* DependancyInjection.swift in Sources */, + EC7A882F2B28E6BE004F226A /* ConfidentialityButton.swift in Sources */, + ECB7BC702B336E28002A6654 /* RegisterViewModel.swift in Sources */, + EC650A4C2B25E9C7003AFCAD /* RankingView.swift in Sources */, + EC7A882B2B28D1E0004F226A /* DropDownMenu.swift in Sources */, + EC6B96C72B24B5A100FC1C58 /* User.swift in Sources */, + EC7A882D2B28D8A1004F226A /* CreationBetView.swift in Sources */, + EC6B96CF2B24B8D900FC1C58 /* Config.swift in Sources */, + EC30770B2B24D9160060E34D /* WelcomeView.swift in Sources */, + EC30770D2B24DB7A0060E34D /* Extensions.swift in Sources */, + EC6B96D82B24BF2100FC1C58 /* Menu.swift in Sources */, + EC650A4E2B278EDB003AFCAD /* TrendingBetCard.swift in Sources */, + EC0193782B25BF16005D81E6 /* AllcoinsCapsule.swift in Sources */, + EC650A4A2B25DD58003AFCAD /* FriendsView.swift in Sources */, + EC3077072B24CB840060E34D /* SplashView.swift in Sources */, + EC01937E2B25C52E005D81E6 /* TopBar.swift in Sources */, + ECA9D1CB2B2DA2320076E0EC /* DropDownFriends.swift in Sources */, + ECB7BC682B2F1ADF002A6654 /* LoginViewModel.swift in Sources */, + EC6B96D52B24BE0E00FC1C58 /* MainView.swift in Sources */, + EC650A562B279D68003AFCAD /* WinModal.swift in Sources */, + EC6B96D12B24BAE800FC1C58 /* AuthService.swift in Sources */, + EC01937C2B25C2A8005D81E6 /* AllcoinsCounter.swift in Sources */, + EC650A542B279545003AFCAD /* ChoiceCapsule.swift in Sources */, + ECB7BC6C2B2F43EE002A6654 /* AppState.swift in Sources */, + ECA9D1C92B2D9ADA0076E0EC /* UserInfo.swift in Sources */, + EC650A582B279D9D003AFCAD /* RecapBetCard.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EC6B96A42B24B4CC00FC1C58 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EC6B96AD2B24B4CC00FC1C58 /* AllInTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + EC6B96AE2B24B4CC00FC1C58 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + EC6B96B72B24B4CC00FC1C58 /* AllInUITests.swift in Sources */, + EC6B96B92B24B4CC00FC1C58 /* AllInUITestsLaunchTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + EC6B96AA2B24B4CC00FC1C58 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = EC6B96972B24B4CC00FC1C58 /* AllIn */; + targetProxy = EC6B96A92B24B4CC00FC1C58 /* PBXContainerItemProxy */; + }; + EC6B96B42B24B4CC00FC1C58 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = EC6B96972B24B4CC00FC1C58 /* AllIn */; + targetProxy = EC6B96B32B24B4CC00FC1C58 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + EC6B96BA2B24B4CC00FC1C58 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + EC6B96BB2B24B4CC00FC1C58 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + EC6B96BD2B24B4CC00FC1C58 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"AllIn/Preview Content\""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_CFBundleDisplayName = "All In"; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UILaunchStoryboardName = "Launch Screen.storyboard"; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.alldev.AllIn; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + EC6B96BE2B24B4CC00FC1C58 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"AllIn/Preview Content\""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_CFBundleDisplayName = "All In"; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UILaunchStoryboardName = "Launch Screen.storyboard"; + INFOPLIST_KEY_UISupportedInterfaceOrientations = UIInterfaceOrientationPortrait; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown"; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.alldev.AllIn; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; + EC6B96C02B24B4CC00FC1C58 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.alldev.AllInTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AllIn.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/AllIn"; + }; + name = Debug; + }; + EC6B96C12B24B4CC00FC1C58 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.alldev.AllInTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/AllIn.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/AllIn"; + }; + name = Release; + }; + EC6B96C32B24B4CC00FC1C58 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.alldev.AllInUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = AllIn; + }; + name = Debug; + }; + EC6B96C42B24B4CC00FC1C58 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.alldev.AllInUITests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = NO; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + TEST_TARGET_NAME = AllIn; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + EC6B96932B24B4CC00FC1C58 /* Build configuration list for PBXProject "AllInApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EC6B96BA2B24B4CC00FC1C58 /* Debug */, + EC6B96BB2B24B4CC00FC1C58 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + EC6B96BC2B24B4CC00FC1C58 /* Build configuration list for PBXNativeTarget "AllIn" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EC6B96BD2B24B4CC00FC1C58 /* Debug */, + EC6B96BE2B24B4CC00FC1C58 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + EC6B96BF2B24B4CC00FC1C58 /* Build configuration list for PBXNativeTarget "AllInTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EC6B96C02B24B4CC00FC1C58 /* Debug */, + EC6B96C12B24B4CC00FC1C58 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + EC6B96C22B24B4CC00FC1C58 /* Build configuration list for PBXNativeTarget "AllInUITests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + EC6B96C32B24B4CC00FC1C58 /* Debug */, + EC6B96C42B24B4CC00FC1C58 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = EC6B96902B24B4CC00FC1C58 /* Project object */; +} diff --git a/Sources/AllInApp/AllInApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Sources/AllInApp/AllInApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Sources/AllInApp/AllInApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Sources/AllInApp/AllInApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Sources/AllInApp/AllInApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Sources/AllInApp/AllInApp.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Sources/AllInApp/AllInApp.xcodeproj/xcshareddata/xcschemes/AllIn.xcscheme b/Sources/AllInApp/AllInApp.xcodeproj/xcshareddata/xcschemes/AllIn.xcscheme new file mode 100644 index 0000000..3c7a08e --- /dev/null +++ b/Sources/AllInApp/AllInApp.xcodeproj/xcshareddata/xcschemes/AllIn.xcscheme @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Sources/AllInApp/AllInTests/AllInTests.swift b/Sources/AllInApp/AllInTests/AllInTests.swift new file mode 100644 index 0000000..b8bfa77 --- /dev/null +++ b/Sources/AllInApp/AllInTests/AllInTests.swift @@ -0,0 +1,53 @@ +// +// AllInTests.swift +// AllInTests +// +// Created by Emre on 19/09/2023. +// + +import XCTest +@testable import AllIn + +final class AllInTests: XCTestCase { + + func testInstance() { + DependencyInjection.shared.addSingleton(UserTest.self, UserTest(age: 10)) + let view1 = View1() + let view2 = View2() + XCTAssertEqual(view1.getAge(), view2.getAge()) + + view1.setAge() + XCTAssertEqual(view1.getAge(), view2.getAge()) + + view2.setAge() + XCTAssertEqual(view1.getAge(), view2.getAge()) + } + + class UserTest { + public var age:Int + init(age:Int) { + self.age = age + } + } + + class View1 { + @Inject private var user:UserTest + func getAge() -> Int { + return user.age + } + func setAge() { + user.age = 20 + } + } + + class View2 { + @Inject private var user:UserTest + func getAge() -> Int { + return user.age + } + func setAge() { + user.age = 40 + } + } + +} diff --git a/Sources/AllInApp/AllInUITests/AllInUITests.swift b/Sources/AllInApp/AllInUITests/AllInUITests.swift new file mode 100644 index 0000000..ee152c5 --- /dev/null +++ b/Sources/AllInApp/AllInUITests/AllInUITests.swift @@ -0,0 +1,41 @@ +// +// AllInUITests.swift +// AllInUITests +// +// Created by Emre on 19/09/2023. +// + +import XCTest + +final class AllInUITests: XCTestCase { + + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + + // In UI tests it is usually best to stop immediately when a failure occurs. + continueAfterFailure = false + + // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + // UI tests must launch the application that they test. + let app = XCUIApplication() + app.launch() + + // Use XCTAssert and related functions to verify your tests produce the correct results. + } + + func testLaunchPerformance() throws { + if #available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 7.0, *) { + // This measures how long it takes to launch your application. + measure(metrics: [XCTApplicationLaunchMetric()]) { + XCUIApplication().launch() + } + } + } +} diff --git a/Sources/AllInApp/AllInUITests/AllInUITestsLaunchTests.swift b/Sources/AllInApp/AllInUITests/AllInUITestsLaunchTests.swift new file mode 100644 index 0000000..7a7b1ea --- /dev/null +++ b/Sources/AllInApp/AllInUITests/AllInUITestsLaunchTests.swift @@ -0,0 +1,32 @@ +// +// AllInUITestsLaunchTests.swift +// AllInUITests +// +// Created by Emre on 19/09/2023. +// + +import XCTest + +final class AllInUITestsLaunchTests: XCTestCase { + + override class var runsForEachTargetApplicationUIConfiguration: Bool { + true + } + + override func setUpWithError() throws { + continueAfterFailure = false + } + + func testLaunch() throws { + let app = XCUIApplication() + app.launch() + + // Insert steps here to perform after app launch but before taking a screenshot, + // such as logging into a test account or navigating somewhere in the app + + let attachment = XCTAttachment(screenshot: app.screenshot()) + attachment.name = "Launch Screen" + attachment.lifetime = .keepAlways + add(attachment) + } +} diff --git a/Sources/Model b/Sources/Model deleted file mode 160000 index 04e1955..0000000 --- a/Sources/Model +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 04e195538174b20d098393076b1bfa3c53b79834 diff --git a/Sources/Model/.gitignore b/Sources/Model/.gitignore new file mode 100644 index 0000000..3b29812 --- /dev/null +++ b/Sources/Model/.gitignore @@ -0,0 +1,9 @@ +.DS_Store +/.build +/Packages +/*.xcodeproj +xcuserdata/ +DerivedData/ +.swiftpm/config/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc diff --git a/Sources/Model/Package.swift b/Sources/Model/Package.swift new file mode 100644 index 0000000..3495d60 --- /dev/null +++ b/Sources/Model/Package.swift @@ -0,0 +1,28 @@ +// swift-tools-version: 5.8 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "Model", + products: [ + // Products define the executables and libraries a package produces, and make them visible to other packages. + .library( + name: "Model", + targets: ["Model"]), + ], + dependencies: [ + // Dependencies declare other packages that this package depends on. + // .package(url: /* package url */, from: "1.0.0"), + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages this package depends on. + .target( + name: "Model", + dependencies: []), + .testTarget( + name: "ModelTests", + dependencies: ["Model"]), + ] +) diff --git a/Sources/Model/README.md b/Sources/Model/README.md new file mode 100644 index 0000000..3d677e7 --- /dev/null +++ b/Sources/Model/README.md @@ -0,0 +1,3 @@ +# Model + +A description of this package. diff --git a/Sources/Model/Sources/Model/Model.swift b/Sources/Model/Sources/Model/Model.swift new file mode 100644 index 0000000..c88e2a8 --- /dev/null +++ b/Sources/Model/Sources/Model/Model.swift @@ -0,0 +1,6 @@ +public struct Model { + public private(set) var text = "Hello, World!" + + public init() { + } +} diff --git a/Sources/Model/Tests/ModelTests/ModelTests.swift b/Sources/Model/Tests/ModelTests/ModelTests.swift new file mode 100644 index 0000000..38c36bb --- /dev/null +++ b/Sources/Model/Tests/ModelTests/ModelTests.swift @@ -0,0 +1,11 @@ +import XCTest +@testable import Model + +final class ModelTests: XCTestCase { + func testExample() throws { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct + // results. + XCTAssertEqual(Model().text, "Hello, World!") + } +}