Skip to content

Commit

Permalink
Merge with dev
Browse files Browse the repository at this point in the history
  • Loading branch information
anushkasankaran committed Feb 7, 2024
2 parents 4e64b0d + ce16d49 commit 06a6c30
Show file tree
Hide file tree
Showing 23 changed files with 27 additions and 15 deletions.
5 changes: 4 additions & 1 deletion HIAPI/Models/User.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ public struct Roles: OptionSet, Codable {
public static let SPONSOR = Roles(rawValue: 1 << 4)
public static let STAFF = Roles(rawValue: 1 << 5)
public static let ADMIN = Roles(rawValue: 1 << 6)
public static let allRoles = ["USER", "APPLICANT", "ATTENDEE", "MENTOR", "SPONSOR", "STAFF", "ADMIN"]
public static let PRO = Roles(rawValue: 1 << 7)
public static let allRoles = ["USER", "APPLICANT", "ATTENDEE", "MENTOR", "SPONSOR", "STAFF", "ADMIN", "PRO"]

public init(rawValue: Int) {
self.rawValue = rawValue
Expand All @@ -59,6 +60,7 @@ public struct Roles: OptionSet, Codable {
case "SPONSOR": self = .SPONSOR
case "STAFF": self = .STAFF
case "ADMIN": self = .ADMIN
case "PRO": self = .PRO
default:
#if DEBUG
throw DecodingError.unknownOption
Expand All @@ -77,6 +79,7 @@ public struct Roles: OptionSet, Codable {
if contains(.SPONSOR) { try container.encode("SPONSOR") }
if contains(.STAFF) { try container.encode("STAFF") }
if contains(.ADMIN) { try container.encode("ADMIN") }
if contains(.PRO) { try container.encode("PRO") }
}
}

Expand Down
10 changes: 5 additions & 5 deletions HackIllinois.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objectVersion = 52;
objects = {

/* Begin PBXBuildFile section */
Expand Down Expand Up @@ -138,6 +138,7 @@
D14D3AE3295FBDA200EB7995 /* HIBannerViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D14D3AE2295FBDA100EB7995 /* HIBannerViewController.swift */; };
D1BE81172AC8FC680042C078 /* HIAPI.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 95E3142A21FAD5B30092C22E /* HIAPI.framework */; };
D1BE81182AC8FC690042C078 /* HIAPI.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 95E3142A21FAD5B30092C22E /* HIAPI.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
D1F1463A2B605C57004E7FC9 /* Hack_Mushroom_Loading.json in Resources */ = {isa = PBXBuildFile; fileRef = D1F146392B605C57004E7FC9 /* Hack_Mushroom_Loading.json */; };
D3A309BC2211175200CBA351 /* PassKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D3A309BB2211175200CBA351 /* PassKit.framework */; };
D7451BD22B54BCFB00D501D0 /* URLImage in Frameworks */ = {isa = PBXBuildFile; productRef = D7451BD12B54BCFB00D501D0 /* URLImage */; };
DF3706382925DDAA000B4278 /* GoogleMapsBase.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DF3706372925DDAA000B4278 /* GoogleMapsBase.framework */; };
Expand All @@ -161,7 +162,6 @@
DF37065C2925DE5D000B4278 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DF37065B2925DE5D000B4278 /* SystemConfiguration.framework */; };
DF37065E2925DE66000B4278 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DF37065D2925DE66000B4278 /* UIKit.framework */; };
DF5B27C5299197E80034A8B9 /* Array.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF5B27C4299197E80034A8B9 /* Array.swift */; };
DF5B27C7299372AE0034A8B9 /* Hack_PopcornCart_Text.json in Resources */ = {isa = PBXBuildFile; fileRef = DF5B27C6299372AE0034A8B9 /* Hack_PopcornCart_Text.json */; };
E170038A29679D08009B99A8 /* HIProfileCardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E170038929679D08009B99A8 /* HIProfileCardView.swift */; };
E1BF5E7A298B462F00A98390 /* HIStaffButtonView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1BF5E79298B462F00A98390 /* HIStaffButtonView.swift */; };
E1E4A5D9291C9BF800780BA1 /* HICarouselSwiftUIView.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1E4A5D6291C9BF700780BA1 /* HICarouselSwiftUIView.swift */; };
Expand Down Expand Up @@ -344,6 +344,7 @@
D12B40FE2AC0B0BD001BCB05 /* HIScanAttendanceViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HIScanAttendanceViewController.swift; sourceTree = "<group>"; };
D134D30E296B3F56006EA589 /* Montserrat-VariableFont_wght.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "Montserrat-VariableFont_wght.ttf"; sourceTree = "<group>"; };
D14D3AE2295FBDA100EB7995 /* HIBannerViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HIBannerViewController.swift; sourceTree = "<group>"; };
D1F146392B605C57004E7FC9 /* Hack_Mushroom_Loading.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Hack_Mushroom_Loading.json; sourceTree = "<group>"; };
D3A309BA221116A600CBA351 /* HackIllinois.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = HackIllinois.entitlements; sourceTree = "<group>"; };
D3A309BB2211175200CBA351 /* PassKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PassKit.framework; path = System/Library/Frameworks/PassKit.framework; sourceTree = SDKROOT; };
DF3706372925DDAA000B4278 /* GoogleMapsBase.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = GoogleMapsBase.framework; sourceTree = "<group>"; };
Expand All @@ -367,7 +368,6 @@
DF37065B2925DE5D000B4278 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
DF37065D2925DE66000B4278 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
DF5B27C4299197E80034A8B9 /* Array.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Array.swift; sourceTree = "<group>"; };
DF5B27C6299372AE0034A8B9 /* Hack_PopcornCart_Text.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = Hack_PopcornCart_Text.json; sourceTree = "<group>"; };
E170038929679D08009B99A8 /* HIProfileCardView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HIProfileCardView.swift; sourceTree = "<group>"; };
E1BF5E79298B462F00A98390 /* HIStaffButtonView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HIStaffButtonView.swift; sourceTree = "<group>"; };
E1E4A5D6291C9BF700780BA1 /* HICarouselSwiftUIView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HICarouselSwiftUIView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -796,7 +796,7 @@
E1E4A5D5291C9BF700780BA1 /* UI */ = {
isa = PBXGroup;
children = (
DF5B27C6299372AE0034A8B9 /* Hack_PopcornCart_Text.json */,
D1F146392B605C57004E7FC9 /* Hack_Mushroom_Loading.json */,
E1E4A5D6291C9BF700780BA1 /* HICarouselSwiftUIView.swift */,
);
path = UI;
Expand Down Expand Up @@ -974,11 +974,11 @@
1C7561A3278E96600004D739 /* DarkVespaText.json in Resources */,
951827A91EA35DB800049F79 /* Assets.xcassets in Resources */,
952D1542220D453D0041383A /* countdown-60.json in Resources */,
D1F1463A2B605C57004E7FC9 /* Hack_Mushroom_Loading.json in Resources */,
951827B41EA35E8B00049F79 /* LaunchScreen.storyboard in Resources */,
1C7561A5278E96750004D739 /* LightVespaText.json in Resources */,
D134D30F296B3F56006EA589 /* Montserrat-VariableFont_wght.ttf in Resources */,
DF37063E2925DDE7000B4278 /* GoogleMaps.bundle in Resources */,
DF5B27C7299372AE0034A8B9 /* Hack_PopcornCart_Text.json in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"images" : [
{
"filename" : "BackgroundPad@1x.png",
"filename" : "BackgroundPad.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "BackgroundPad@2x.png",
"filename" : "BackgroundPad2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "BackgroundPad@3x.png",
"filename" : "BackgroundPad3x.png",
"idiom" : "universal",
"scale" : "3x"
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions HackIllinois/Assets.xcassets/iPadLogin.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"images" : [
{
"filename" : "iPad Pro 11_ - 1.png",
"filename" : "Home.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "iPad Pro 11_ - 1@2x.png",
"filename" : "Home2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "iPad Pro 11_ - 1@3x.png",
"filename" : "Home3x.png",
"idiom" : "universal",
"scale" : "3x"
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 10 additions & 2 deletions HackIllinois/SwiftUI/HIOnboardingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct HIOnboardingView: View {
@StateObject private var viewModel = HIOnboardingViewModel()
var body: some View {
ZStack {
Image("Login")
Image(getBackgroundImageName())
.resizable()
.ignoresSafeArea()
.zIndex(-1)
Expand Down Expand Up @@ -54,14 +54,22 @@ struct HIOnboardingView: View {
}
}
}

func getBackgroundImageName() -> String {
if UIDevice.current.userInterfaceIdiom == .pad {
return "iPadLogin"
} else {
return "Login"
}
}
}

// MARK: - SwiftUI => LottieView
struct LottieView: UIViewRepresentable {
@Binding var shouldDisplayAnimationOnNextAppearance: Bool
func makeUIView(context: UIViewRepresentableContext<LottieView>) -> UIView {
let view = UIView(frame: .zero)
let animationView = LottieAnimationView(name: "Hack_PopcornCart_Text")
let animationView = LottieAnimationView(name: "Hack_Mushroom_Loading")
animationView.contentMode = .scaleAspectFit
animationView.frame = view.frame
animationView.autoresizingMask = [.flexibleWidth, .flexibleHeight]
Expand Down
1 change: 1 addition & 0 deletions HackIllinois/SwiftUI/UI/HackMushroom.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions HackIllinois/SwiftUI/UI/Hack_Mushroom_Loading.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion HackIllinois/SwiftUI/UI/Hack_PopcornCart_Text.json

This file was deleted.

0 comments on commit 06a6c30

Please sign in to comment.