Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bet Tracker View #14

Merged
merged 15 commits into from
Mar 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*.DS_Store
.build/
xcuserdata/
**/xcuserdata/
xcshareddata/swiftpm/
96 changes: 66 additions & 30 deletions All In.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,16 @@
objects = {

/* Begin PBXBuildFile section */
2951F2692D8CCD7C0056F078 /* DailyGainLoss.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2951F2682D8CCD760056F078 /* DailyGainLoss.swift */; };
2973B0652D875F13003C9CF5 /* FrequentAskedQuestion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2973B0642D875F06003C9CF5 /* FrequentAskedQuestion.swift */; };
29AB851E2D8E10550052E0A6 /* FAQ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29AB851D2D8E10530052E0A6 /* FAQ.swift */; };
29C66D082D8CDC4F00166BD7 /* LexendDeca-Medium.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 29C66D052D8CDC4F00166BD7 /* LexendDeca-Medium.ttf */; };
29C66D092D8CDC4F00166BD7 /* LexendDeca-Light.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 29C66D042D8CDC4F00166BD7 /* LexendDeca-Light.ttf */; };
29C66D0A2D8CDC4F00166BD7 /* LexendDeca-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 29C66D062D8CDC4F00166BD7 /* LexendDeca-Regular.ttf */; };
29C66D0B2D8CDC4F00166BD7 /* LexendDeca-SemiBold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 29C66D072D8CDC4F00166BD7 /* LexendDeca-SemiBold.ttf */; };
29C8A00D2D8F8E8000F9B3F5 /* Pill.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29C8A00B2D8F8E8000F9B3F5 /* Pill.swift */; };
29C8A00E2D8F8E8000F9B3F5 /* BetTrackerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29C8A00A2D8F8E8000F9B3F5 /* BetTrackerView.swift */; };
29C8A00F2D8F8E8000F9B3F5 /* ProfileViewViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29C8A0082D8F8E8000F9B3F5 /* ProfileViewViewModel.swift */; };
29C8A0112D8F8E9D00F9B3F5 /* FAQ.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29C8A0102D8F8E9B00F9B3F5 /* FAQ.swift */; };
897DFBDE2CCED80600246B0D /* PlayerChestViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897DFBB62CCED80600246B0D /* PlayerChestViewModel.swift */; };
897DFBDF2CCED80600246B0D /* RarityChestSheetViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897DFBB72CCED80600246B0D /* RarityChestSheetViewModel.swift */; };
897DFBE02CCED80600246B0D /* SheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897DFBB92CCED80600246B0D /* SheetView.swift */; };
Expand All @@ -22,7 +30,6 @@
897DFBE82CCED80600246B0D /* HomeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897DFBC32CCED80600246B0D /* HomeView.swift */; };
897DFBE92CCED80600246B0D /* MarketplaceViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897DFBC52CCED80600246B0D /* MarketplaceViewModel.swift */; };
897DFBEA2CCED80600246B0D /* MarketplaceView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897DFBC72CCED80600246B0D /* MarketplaceView.swift */; };
897DFBEB2CCED80600246B0D /* ProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897DFBCA2CCED80600246B0D /* ProfileView.swift */; };
897DFBEC2CCED80600246B0D /* PlayerAveragesModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897DFBCC2CCED80600246B0D /* PlayerAveragesModel.swift */; };
897DFBED2CCED80600246B0D /* PlayerDataModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897DFBCD2CCED80600246B0D /* PlayerDataModel.swift */; };
897DFBEE2CCED80600246B0D /* PlayerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 897DFBCE2CCED80600246B0D /* PlayerModel.swift */; };
Expand All @@ -46,7 +53,6 @@
D0155A832B950FF6003FE6BC /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0155A822B950FF6003FE6BC /* ContentView.swift */; };
D0155A852B950FF7003FE6BC /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D0155A842B950FF7003FE6BC /* Assets.xcassets */; };
D0155A882B950FF7003FE6BC /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D0155A872B950FF7003FE6BC /* Preview Assets.xcassets */; };
D01FBED92D74F76D00D365EF /* ProfileViewViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = D01FBED82D74F76D00D365EF /* ProfileViewViewModel.swift */; };
D047C6312BD6E9DA007F6103 /* AlamofireImage in Frameworks */ = {isa = PBXBuildFile; productRef = D047C6302BD6E9DA007F6103 /* AlamofireImage */; };
D057FD852BA76F8600EF552D /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = D057FD842BA76F8600EF552D /* Constants.swift */; };
D0CD31822BD5A2F500E7136C /* NetworkManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0CD31812BD5A2F500E7136C /* NetworkManager.swift */; };
Expand All @@ -72,8 +78,17 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
2951F2682D8CCD760056F078 /* DailyGainLoss.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DailyGainLoss.swift; sourceTree = "<group>"; };
2973B0642D875F06003C9CF5 /* FrequentAskedQuestion.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FrequentAskedQuestion.swift; sourceTree = "<group>"; };
29AB851D2D8E10530052E0A6 /* FAQ.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FAQ.swift; sourceTree = "<group>"; };
29C66D042D8CDC4F00166BD7 /* LexendDeca-Light.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "LexendDeca-Light.ttf"; sourceTree = "<group>"; };
29C66D052D8CDC4F00166BD7 /* LexendDeca-Medium.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "LexendDeca-Medium.ttf"; sourceTree = "<group>"; };
29C66D062D8CDC4F00166BD7 /* LexendDeca-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "LexendDeca-Regular.ttf"; sourceTree = "<group>"; };
29C66D072D8CDC4F00166BD7 /* LexendDeca-SemiBold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "LexendDeca-SemiBold.ttf"; sourceTree = "<group>"; };
29C8A0082D8F8E8000F9B3F5 /* ProfileViewViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileViewViewModel.swift; sourceTree = "<group>"; };
29C8A00A2D8F8E8000F9B3F5 /* BetTrackerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BetTrackerView.swift; sourceTree = "<group>"; };
29C8A00B2D8F8E8000F9B3F5 /* Pill.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Pill.swift; sourceTree = "<group>"; };
29C8A0102D8F8E9B00F9B3F5 /* FAQ.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FAQ.swift; sourceTree = "<group>"; };
29DB4FC32D8CDEAC00E489DB /* All-In-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = "All-In-Info.plist"; sourceTree = SOURCE_ROOT; };
897DFBB62CCED80600246B0D /* PlayerChestViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerChestViewModel.swift; sourceTree = "<group>"; };
897DFBB72CCED80600246B0D /* RarityChestSheetViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RarityChestSheetViewModel.swift; sourceTree = "<group>"; };
897DFBB92CCED80600246B0D /* SheetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SheetView.swift; sourceTree = "<group>"; };
Expand All @@ -87,7 +102,6 @@
897DFBC32CCED80600246B0D /* HomeView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeView.swift; sourceTree = "<group>"; };
897DFBC52CCED80600246B0D /* MarketplaceViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarketplaceViewModel.swift; sourceTree = "<group>"; };
897DFBC72CCED80600246B0D /* MarketplaceView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarketplaceView.swift; sourceTree = "<group>"; };
897DFBCA2CCED80600246B0D /* ProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileView.swift; sourceTree = "<group>"; };
897DFBCC2CCED80600246B0D /* PlayerAveragesModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerAveragesModel.swift; sourceTree = "<group>"; };
897DFBCD2CCED80600246B0D /* PlayerDataModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerDataModel.swift; sourceTree = "<group>"; };
897DFBCE2CCED80600246B0D /* PlayerModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PlayerModel.swift; sourceTree = "<group>"; };
Expand All @@ -114,7 +128,6 @@
D0155A872B950FF7003FE6BC /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = "<group>"; };
D0155A8D2B950FF7003FE6BC /* All InTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "All InTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
D0155A972B950FF7003FE6BC /* All InUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "All InUITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
D01FBED82D74F76D00D365EF /* ProfileViewViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileViewViewModel.swift; sourceTree = "<group>"; };
D057FD842BA76F8600EF552D /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
D0CD31812BD5A2F500E7136C /* NetworkManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NetworkManager.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -147,14 +160,44 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
29AB851C2D8E10490052E0A6 /* Models */ = {
29C66D032D8CDC4400166BD7 /* Fonts */ = {
isa = PBXGroup;
children = (
29AB851D2D8E10530052E0A6 /* FAQ.swift */,
29C66D042D8CDC4F00166BD7 /* LexendDeca-Light.ttf */,
29C66D052D8CDC4F00166BD7 /* LexendDeca-Medium.ttf */,
29C66D062D8CDC4F00166BD7 /* LexendDeca-Regular.ttf */,
29C66D072D8CDC4F00166BD7 /* LexendDeca-SemiBold.ttf */,
);
path = Fonts;
sourceTree = "<group>";
};
29C8A0072D8F8E8000F9B3F5 /* Models */ = {
isa = PBXGroup;
children = (
29C8A0102D8F8E9B00F9B3F5 /* FAQ.swift */,
);
path = Models;
sourceTree = "<group>";
};
29C8A0092D8F8E8000F9B3F5 /* ViewModels */ = {
isa = PBXGroup;
children = (
29C8A0082D8F8E8000F9B3F5 /* ProfileViewViewModel.swift */,
);
path = ViewModels;
sourceTree = "<group>";
};
29C8A00C2D8F8E8000F9B3F5 /* Profile */ = {
isa = PBXGroup;
children = (
29C8A0072D8F8E8000F9B3F5 /* Models */,
29C8A0092D8F8E8000F9B3F5 /* ViewModels */,
29C8A00A2D8F8E8000F9B3F5 /* BetTrackerView.swift */,
29C8A00B2D8F8E8000F9B3F5 /* Pill.swift */,
);
path = Profile;
sourceTree = "<group>";
};
897DFBB82CCED80600246B0D /* ViewModels */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -215,16 +258,6 @@
path = Marketplace;
sourceTree = "<group>";
};
897DFBCB2CCED80600246B0D /* Profile */ = {
isa = PBXGroup;
children = (
29AB851C2D8E10490052E0A6 /* Models */,
D01FBEDA2D74F77C00D365EF /* ViewModels */,
897DFBCA2CCED80600246B0D /* ProfileView.swift */,
);
path = Profile;
sourceTree = "<group>";
};
897DFBCF2CCED80600246B0D /* Player */ = {
isa = PBXGroup;
children = (
Expand All @@ -238,6 +271,7 @@
897DFBD42CCED80600246B0D /* Models */ = {
isa = PBXGroup;
children = (
2951F2682D8CCD760056F078 /* DailyGainLoss.swift */,
897DFBCF2CCED80600246B0D /* Player */,
897DFBD02CCED80600246B0D /* ChestModel.swift */,
897DFBD12CCED80600246B0D /* ContractModel.swift */,
Expand Down Expand Up @@ -279,9 +313,9 @@
897DFBDD2CCED80600246B0D /* Features */ = {
isa = PBXGroup;
children = (
29C8A00C2D8F8E8000F9B3F5 /* Profile */,
897DFBC42CCED80600246B0D /* Home */,
897DFBC82CCED80600246B0D /* Marketplace */,
897DFBCB2CCED80600246B0D /* Profile */,
897DFBDC2CCED80600246B0D /* Shared */,
);
path = Features;
Expand All @@ -300,6 +334,7 @@
CE101CDC2BA776ED00218E40 /* Resources */ = {
isa = PBXGroup;
children = (
29C66D032D8CDC4400166BD7 /* Fonts */,
D0155A842B950FF7003FE6BC /* Assets.xcassets */,
D0155A862B950FF7003FE6BC /* Preview Content */,
);
Expand Down Expand Up @@ -329,6 +364,7 @@
D0155A7F2B950FF6003FE6BC /* All In */ = {
isa = PBXGroup;
children = (
29DB4FC32D8CDEAC00E489DB /* All-In-Info.plist */,
9928219F2BC0931200B592F7 /* AllInApp.swift */,
D0155A822B950FF6003FE6BC /* ContentView.swift */,
CE101CDC2BA776ED00218E40 /* Resources */,
Expand Down Expand Up @@ -364,14 +400,6 @@
path = "All InUITests";
sourceTree = "<group>";
};
D01FBEDA2D74F77C00D365EF /* ViewModels */ = {
isa = PBXGroup;
children = (
D01FBED82D74F76D00D365EF /* ProfileViewViewModel.swift */,
);
path = ViewModels;
sourceTree = "<group>";
};
D057FD832BA76F7B00EF552D /* Utils */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -508,6 +536,10 @@
buildActionMask = 2147483647;
files = (
D0155A882B950FF7003FE6BC /* Preview Assets.xcassets in Resources */,
29C66D082D8CDC4F00166BD7 /* LexendDeca-Medium.ttf in Resources */,
29C66D092D8CDC4F00166BD7 /* LexendDeca-Light.ttf in Resources */,
29C66D0A2D8CDC4F00166BD7 /* LexendDeca-Regular.ttf in Resources */,
29C66D0B2D8CDC4F00166BD7 /* LexendDeca-SemiBold.ttf in Resources */,
D0155A852B950FF7003FE6BC /* Assets.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -575,21 +607,23 @@
897DFBE82CCED80600246B0D /* HomeView.swift in Sources */,
897DFBE92CCED80600246B0D /* MarketplaceViewModel.swift in Sources */,
897DFBEA2CCED80600246B0D /* MarketplaceView.swift in Sources */,
897DFBEB2CCED80600246B0D /* ProfileView.swift in Sources */,
897DFBEC2CCED80600246B0D /* PlayerAveragesModel.swift in Sources */,
897DFBED2CCED80600246B0D /* PlayerDataModel.swift in Sources */,
897DFBEE2CCED80600246B0D /* PlayerModel.swift in Sources */,
897DFBEF2CCED80600246B0D /* ChestModel.swift in Sources */,
897DFBF02CCED80600246B0D /* ContractModel.swift in Sources */,
89E4FAA82CEA8F9600A952B1 /* Logger.swift in Sources */,
897DFBF12CCED80600246B0D /* TransactionModel.swift in Sources */,
29AB851E2D8E10550052E0A6 /* FAQ.swift in Sources */,
897DFBF22CCED80600246B0D /* UserModel.swift in Sources */,
897DFBF32CCED80600246B0D /* PillSelectView.swift in Sources */,
897DFBF42CCED80600246B0D /* ViewController.swift in Sources */,
D01FBED92D74F76D00D365EF /* ProfileViewViewModel.swift in Sources */,
897DFBF52CCED80600246B0D /* ContractCard.swift in Sources */,
897DFBF62CCED80600246B0D /* PlayerContractSheetView.swift in Sources */,
29C8A00D2D8F8E8000F9B3F5 /* Pill.swift in Sources */,
29C8A00E2D8F8E8000F9B3F5 /* BetTrackerView.swift in Sources */,
29C8A00F2D8F8E8000F9B3F5 /* ProfileViewViewModel.swift in Sources */,
29C8A0112D8F8E9D00F9B3F5 /* FAQ.swift in Sources */,
2951F2692D8CCD7C0056F078 /* DailyGainLoss.swift in Sources */,
897DFBF72CCED80600246B0D /* TabBar.swift in Sources */,
D057FD852BA76F8600EF552D /* Constants.swift in Sources */,
);
Expand Down Expand Up @@ -762,6 +796,7 @@
ENABLE_PREVIEWS = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "All-In-Info.plist";
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
Expand Down Expand Up @@ -792,6 +827,7 @@
ENABLE_PREVIEWS = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_FILE = "All-In-Info.plist";
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>All In.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
<integer>3</integer>
</dict>
<key>SnapKitPlayground (Playground) 1.xcscheme</key>
<dict>
Expand Down
3 changes: 3 additions & 0 deletions All In/AllInApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ import SwiftUI

@main
struct AllInApp: App {

var body: some Scene {
WindowGroup {
ContentView()
.environmentObject(ProfileViewViewModel())
.environmentObject(TabNavigationManager())
}
}

}
42 changes: 19 additions & 23 deletions All In/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,34 +9,30 @@ import SwiftUI

struct ContentView: View {

@State var tabSelection = 0
@EnvironmentObject var tabNavigationManager: TabNavigationManager

private let transitionModifier = AnyTransition.opacity.animation(.easeInOut(duration: 0.15))

var body: some View {
ZStack {
TabView(selection: $tabSelection) {
HomeView(tabSelection: $tabSelection)
.tag(0)
.tabItem {
EmptyView()
}

MarketplaceView(tabSelection: $tabSelection)
.tag(1)
.tabItem {
EmptyView()
}

ProfileView(tabSelection: $tabSelection, user: User.dummyData[0])
.tag(2)
.tabItem {
EmptyView()
}
VStack {
Group {
if tabNavigationManager.selectedTab == .home {
HomeView()
.transition(transitionModifier)
} else if tabNavigationManager.selectedTab == .market {
MarketplaceView()
.transition(transitionModifier)
} else if tabNavigationManager.selectedTab == .betTracker {
BetTrackerView(user: User.dummyData[0])
.transition(transitionModifier)
}
}
.onAppear {
UITabBar.appearance().unselectedItemTintColor = .white

}
TabBar(selectedPage: $tabNavigationManager.selectedTab)
.frame(height: 96)
}
.ignoresSafeArea()
.background(Constants.Colors.background)
}

}
Expand Down
Loading