diff --git a/HackIllinois/Assets.xcassets/scanner-menu.imageset/Contents.json b/HackIllinois/Assets.xcassets/scanner-menu.imageset/Contents.json new file mode 100644 index 00000000..85560c29 --- /dev/null +++ b/HackIllinois/Assets.xcassets/scanner-menu.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "Group 902.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Group 902@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "Group 902@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/HackIllinois/Assets.xcassets/scanner-menu.imageset/Group 902.png b/HackIllinois/Assets.xcassets/scanner-menu.imageset/Group 902.png new file mode 100644 index 00000000..cb82c185 Binary files /dev/null and b/HackIllinois/Assets.xcassets/scanner-menu.imageset/Group 902.png differ diff --git a/HackIllinois/Assets.xcassets/scanner-menu.imageset/Group 902@2x.png b/HackIllinois/Assets.xcassets/scanner-menu.imageset/Group 902@2x.png new file mode 100644 index 00000000..c5409453 Binary files /dev/null and b/HackIllinois/Assets.xcassets/scanner-menu.imageset/Group 902@2x.png differ diff --git a/HackIllinois/Assets.xcassets/scanner-menu.imageset/Group 902@3x.png b/HackIllinois/Assets.xcassets/scanner-menu.imageset/Group 902@3x.png new file mode 100644 index 00000000..5ff2d72c Binary files /dev/null and b/HackIllinois/Assets.xcassets/scanner-menu.imageset/Group 902@3x.png differ diff --git a/HackIllinois/UI/HIAppearance.swift b/HackIllinois/UI/HIAppearance.swift index 351856c2..69657340 100644 --- a/HackIllinois/UI/HIAppearance.swift +++ b/HackIllinois/UI/HIAppearance.swift @@ -86,9 +86,9 @@ struct HIAppearance: Equatable { let countdownTextColor: UIColor let countdownBackground: UIColor let bannerBackground: UIColor - let scannerButtonPink: UIColor - let scannerButtonTeal: UIColor - let scannerButtonYellow: UIColor + let scannerButtonYellowOrange: UIColor + let scannerButtonTealBlue: UIColor + let scannerButtonOrangeBrown: UIColor let scannerButtonBorder: UIColor let scannerButtonShadow: UIColor let proBackground: UIColor @@ -127,7 +127,6 @@ struct HIAppearance: Equatable { private static let lightPurple = #colorLiteral(red: 0.662745098, green: 0.4666666667, blue: 0.6705882353, alpha: 1) private static let indigo = #colorLiteral(red: 0.3568627451, green: 0.3803921569, blue: 0.6078431373, alpha: 1) private static let darknavy = #colorLiteral(red: 0.1137254902, green: 0.1490196078, blue: 0.2666666667, alpha: 1) - private static let transparent = #colorLiteral(red: 1, green: 1, blue: 1, alpha: 0) private static let white = #colorLiteral(red: 1, green: 1, blue: 1, alpha: 1) private static let black = #colorLiteral(red: 0, green: 0, blue: 0, alpha: 1) private static let buttonPink = #colorLiteral(red: 0.862745098, green: 0.5411764706, blue: 0.662745098, alpha: 1) @@ -136,15 +135,19 @@ struct HIAppearance: Equatable { private static let offWhite = #colorLiteral(red: 1, green: 0.9725490196, blue: 0.9607843137, alpha: 1) private static let transparent2 = #colorLiteral(red: 1, green: 1, blue: 1, alpha: 0) // Hack 2025 color palette (color name + hex code) - private static let rawSienna = #colorLiteral(red: 0.8705882353, green: 0.5568627451, blue: 0.2705882353, alpha: 1) // #DE8E45 - private static let neptune = #colorLiteral(red: 0.5176470588, green: 0.737254902, blue: 0.7254901961, alpha: 1) // #84BCB9 - private static let lightningYellow = #colorLiteral(red: 0.9764705882, green: 0.7568627451, blue: 0.1490196078, alpha: 1) // #F9C126 - private static let copper = #colorLiteral(red: 0.7725490196, green: 0.4039215686, blue: 0.2470588235, alpha: 1) // #C5673F - private static let metallicCopper = #colorLiteral(red: 0.4274509804, green: 0.1607843137, blue: 0.1019607843, alpha: 1) // #6D291A - private static let yellowOrange = #colorLiteral(red: 1.0, green: 0.6980392157, blue: 0.2431372549, alpha: 1) // #FFB23E - private static let muleFawn = #colorLiteral(red: 0.537254902, green: 0.2470588235, blue: 0.1843137255, alpha: 1) // #893F2F - private static let elephant = #colorLiteral(red: 0.05098039216, green: 0.2470588235, blue: 0.2549019608, alpha: 1) // #0D3F41 - private static let doveGray = #colorLiteral(red: 0.4235294118, green: 0.4235294118, blue: 0.4235294118, alpha: 1) // #6C6C6C + public static let rawSienna = #colorLiteral(red: 0.8705882353, green: 0.5568627451, blue: 0.2705882353, alpha: 1) // #DE8E45 + public static let neptune = #colorLiteral(red: 0.5176470588, green: 0.737254902, blue: 0.7254901961, alpha: 1) // #84BCB9 + public static let lightningYellow = #colorLiteral(red: 0.9764705882, green: 0.7568627451, blue: 0.1490196078, alpha: 1) // #F9C126 + public static let copper = #colorLiteral(red: 0.7725490196, green: 0.4039215686, blue: 0.2470588235, alpha: 1) // #C5673F + public static let metallicCopper = #colorLiteral(red: 0.4274509804, green: 0.1607843137, blue: 0.1019607843, alpha: 1) // #6D291A + public static let yellowOrange = #colorLiteral(red: 1.0, green: 0.6980392157, blue: 0.2431372549, alpha: 1) // #FFB23E + public static let muleFawn = #colorLiteral(red: 0.537254902, green: 0.2470588235, blue: 0.1843137255, alpha: 1) // #893F2F + public static let elephant = #colorLiteral(red: 0.05098039216, green: 0.2470588235, blue: 0.2549019608, alpha: 1) // #0D3F41 + public static let transparent = #colorLiteral(red: 1, green: 1, blue: 1, alpha: 0) + public static let doveGray = #colorLiteral(red: 0.4235294118, green: 0.4235294118, blue: 0.4235294118, alpha: 1) // #6C6C6C + public static let buttonYellowOrange = #colorLiteral(red: 0.8902, green: 0.6549, blue: 0.2824, alpha: 1) // #E3A748 + public static let buttonTealBlue = #colorLiteral(red: 0.3686, green: 0.7098, blue: 0.7294, alpha: 1) // #5EB5BA + public static let buttonOrangeBrown = #colorLiteral(red: 0.7725, green: 0.4039, blue: 0.2471, alpha: 1) // #C5673F private static let navBarYellow = #colorLiteral(red: 0.9603472352, green: 0.9405072331, blue: 0.8672463298, alpha: 1) private static var statusBarWhite: UIStatusBarStyle { return .lightContent @@ -226,9 +229,9 @@ struct HIAppearance: Equatable { countdownTextColor: brown, countdownBackground: orange, bannerBackground: lightYellow, - scannerButtonPink: buttonPink, - scannerButtonTeal: buttonTeal, - scannerButtonYellow: buttonYellow, + scannerButtonYellowOrange: buttonYellowOrange, + scannerButtonTealBlue: buttonTealBlue, + scannerButtonOrangeBrown: buttonOrangeBrown, scannerButtonBorder: medBrown, scannerButtonShadow: darkBrown, proBackground: medTeal, @@ -307,9 +310,9 @@ struct HIAppearance: Equatable { countdownTextColor: brown, countdownBackground: orange, bannerBackground: lightYellow, - scannerButtonPink: buttonPink, - scannerButtonTeal: buttonTeal, - scannerButtonYellow: buttonYellow, + scannerButtonYellowOrange: yellowOrange, + scannerButtonTealBlue: buttonTealBlue, + scannerButtonOrangeBrown: buttonOrangeBrown, scannerButtonBorder: medBrown, scannerButtonShadow: darkBrown, proBackground: medTeal, diff --git a/HackIllinois/UI/HILabel.swift b/HackIllinois/UI/HILabel.swift index e48398ef..e93c2c18 100644 --- a/HackIllinois/UI/HILabel.swift +++ b/HackIllinois/UI/HILabel.swift @@ -353,7 +353,7 @@ class HILabel: UILabel { font = HIAppearance.Font.locationText case .QRSelection: - textHIColor = \.viewTitleBrown + textHIColor = \.whiteText backgroundHIColor = \.clear font = HIAppearance.Font.QRSelection } diff --git a/HackIllinois/ViewControllers/HIQRAttendeeScannerSelection.swift b/HackIllinois/ViewControllers/HIQRAttendeeScannerSelection.swift index 36b2ee24..0fbfb4fc 100644 --- a/HackIllinois/ViewControllers/HIQRAttendeeScannerSelection.swift +++ b/HackIllinois/ViewControllers/HIQRAttendeeScannerSelection.swift @@ -35,38 +35,26 @@ class HIQRAttendeeScannerSelection: HIBaseViewController { } private let eventCheckInButton = HIButton { $0.tintHIColor = \.action - $0.backgroundHIColor = \.scannerButtonPink + $0.backgroundHIColor = \.scannerButtonYellowOrange $0.layer.borderWidth = 4.0 - $0.layer.borderColor = #colorLiteral(red: 0.4588235294, green: 0.1960784314, blue: 0.07843137255, alpha: 1) + $0.layer.borderColor = #colorLiteral(red: 0.5294, green: 0.3373, blue: 0.0314, alpha: 1) // #875608 // 3D Effect $0.layer.masksToBounds = false - $0.layer.shadowColor = #colorLiteral(red: 0.337254902, green: 0.1411764706, blue: 0.06666666667, alpha: 1) + $0.layer.shadowColor = #colorLiteral(red: 0.5294, green: 0.3373, blue: 0.0314, alpha: 1) $0.layer.shadowOpacity = 1 - $0.layer.shadowOffset = CGSize(width: 0, height: 12) + $0.layer.shadowOffset = CGSize(width: 0, height: 5) $0.layer.shadowRadius = 0 } private let mentorCheckInButton = HIButton { $0.tintHIColor = \.action - $0.backgroundHIColor = \.scannerButtonTeal + $0.backgroundHIColor = \.scannerButtonTealBlue $0.layer.borderWidth = 4.0 - $0.layer.borderColor = #colorLiteral(red: 0.4588235294, green: 0.1960784314, blue: 0.07843137255, alpha: 1) + $0.layer.borderColor = #colorLiteral(red: 0.0549, green: 0.2471, blue: 0.2549, alpha: 1) // #0E3F41 // 3D Effect $0.layer.masksToBounds = false - $0.layer.shadowColor = #colorLiteral(red: 0.337254902, green: 0.1411764706, blue: 0.06666666667, alpha: 1) + $0.layer.shadowColor = #colorLiteral(red: 0.0549, green: 0.2471, blue: 0.2549, alpha: 1) $0.layer.shadowOpacity = 1 - $0.layer.shadowOffset = CGSize(width: 0, height: 12) - $0.layer.shadowRadius = 0 - } - private let pointShopScanButton = HIButton { - $0.tintHIColor = \.action - $0.backgroundHIColor = \.scannerButtonYellow - $0.layer.borderWidth = 4.0 - $0.layer.borderColor = #colorLiteral(red: 0.4588235294, green: 0.1960784314, blue: 0.07843137255, alpha: 1) - // 3D Effect - $0.layer.masksToBounds = false - $0.layer.shadowColor = #colorLiteral(red: 0.337254902, green: 0.1411764706, blue: 0.06666666667, alpha: 1) - $0.layer.shadowOpacity = 1 - $0.layer.shadowOffset = CGSize(width: 0, height: 10) + $0.layer.shadowOffset = CGSize(width: 0, height: 5) $0.layer.shadowRadius = 0 } @objc dynamic override func setUpBackgroundView() { @@ -74,7 +62,7 @@ class HIQRAttendeeScannerSelection: HIBaseViewController { if UIDevice.current.userInterfaceIdiom == .pad { backgroundView.image = UIImage(named: "BackgroundPad") } else { - backgroundView.image = #imageLiteral(resourceName: "Attendee") + backgroundView.image = #imageLiteral(resourceName: "scanner-menu") } } } @@ -94,7 +82,6 @@ extension HIQRAttendeeScannerSelection { } else if !user.roles.contains(.STAFF) { view.addSubview(eventCheckInButton) view.addSubview(mentorCheckInButton) - view.addSubview(pointShopScanButton) view.addSubview(closeButton) view.addSubview(label) @@ -112,12 +99,6 @@ extension HIQRAttendeeScannerSelection { mentorCheckInButton.layer.cornerRadius = (UIDevice.current.userInterfaceIdiom == .pad) ? 30 : 15 mentorCheckInButton.constrain(width: (UIDevice.current.userInterfaceIdiom == .pad) ? 500 : 290, height: (UIDevice.current.userInterfaceIdiom == .pad) ? 150 : 80) - pointShopScanButton.topAnchor.constraint(equalTo: mentorCheckInButton.bottomAnchor, constant: (UIDevice.current.userInterfaceIdiom == .pad) ? 100 : 50).isActive = true - pointShopScanButton.centerXAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerXAnchor).isActive = true - pointShopScanButton.addTarget(self, action: #selector(didSelectPointsShopButton(_:)), for: .touchUpInside) - pointShopScanButton.layer.cornerRadius = (UIDevice.current.userInterfaceIdiom == .pad) ? 30 : 15 - pointShopScanButton.constrain(width: (UIDevice.current.userInterfaceIdiom == .pad) ? 500 : 290, height: (UIDevice.current.userInterfaceIdiom == .pad) ? 150 : 80) - let eventCheckInLabel = HILabel(style: .QRSelection) eventCheckInLabel.text = "Event Check In" eventCheckInButton.addSubview(eventCheckInLabel) @@ -129,12 +110,6 @@ extension HIQRAttendeeScannerSelection { mentorCheckInButton.addSubview(mentorCheckInLabel) mentorCheckInLabel.centerYAnchor.constraint(equalTo: mentorCheckInButton.centerYAnchor).isActive = true mentorCheckInLabel.centerXAnchor.constraint(equalTo: mentorCheckInButton.centerXAnchor).isActive = true - - let pointsShopLabel = HILabel(style: .QRSelection) - pointsShopLabel.text = "Points Shop" - pointShopScanButton.addSubview(pointsShopLabel) - pointsShopLabel.centerYAnchor.constraint(equalTo: pointShopScanButton.centerYAnchor).isActive = true - pointsShopLabel.centerXAnchor.constraint(equalTo: pointShopScanButton.centerXAnchor).isActive = true } closeButton.addTarget(self, action: #selector(didSelectCloseButton(_:)), for: .touchUpInside) closeButton.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 10).isActive = true @@ -143,6 +118,7 @@ extension HIQRAttendeeScannerSelection { closeButton.imageView?.contentMode = .scaleToFill let label = HILabel(style: .viewTitle) label.text = "SCANNER" + label.textHIColor = \.whiteText view.addSubview(label) label.centerYAnchor.constraint(equalTo: closeButton.centerYAnchor).isActive = true label.leadingAnchor.constraint(equalTo: closeButton.trailingAnchor, constant: 3).isActive = true @@ -208,12 +184,3 @@ extension HIQRAttendeeScannerSelection { self.present(scanQRCodePopup, animated: true, completion: nil) } } - -extension HIQRAttendeeScannerSelection { - @objc func didSelectPointsShopButton(_ sender: HIButton) { - let scanQRCodePopup = HIScanPointsShopViewController() - scanQRCodePopup.modalPresentationStyle = .overFullScreen - scanQRCodePopup.modalTransitionStyle = .crossDissolve - self.present(scanQRCodePopup, animated: true, completion: nil) - } -} diff --git a/HackIllinois/ViewControllers/HIQRScannerSelection.swift b/HackIllinois/ViewControllers/HIQRScannerSelection.swift index 8a047e33..344f8dcb 100644 --- a/HackIllinois/ViewControllers/HIQRScannerSelection.swift +++ b/HackIllinois/ViewControllers/HIQRScannerSelection.swift @@ -35,25 +35,37 @@ class HIQRScannerSelection: HIBaseViewController { } private let meetingButton = HIButton { $0.tintHIColor = \.action - $0.backgroundHIColor = \.scannerButtonPink + $0.backgroundHIColor = \.scannerButtonYellowOrange $0.layer.borderWidth = 4.0 - $0.layer.borderColor = #colorLiteral(red: 0.4588235294, green: 0.1960784314, blue: 0.07843137255, alpha: 1) + $0.layer.borderColor = #colorLiteral(red: 0.5294, green: 0.3373, blue: 0.0314, alpha: 1) // 3D Effect $0.layer.masksToBounds = false - $0.layer.shadowColor = #colorLiteral(red: 0.337254902, green: 0.1411764706, blue: 0.06666666667, alpha: 1) + $0.layer.shadowColor = #colorLiteral(red: 0.5294, green: 0.3373, blue: 0.0314, alpha: 1) $0.layer.shadowOpacity = 1 - $0.layer.shadowOffset = CGSize(width: 0, height: 12) + $0.layer.shadowOffset = CGSize(width: 0, height: 5) $0.layer.shadowRadius = 0 } private let attendeeButton = HIButton { $0.tintHIColor = \.action - $0.backgroundHIColor = \.scannerButtonTeal + $0.backgroundHIColor = \.scannerButtonTealBlue $0.layer.borderWidth = 4.0 - $0.layer.borderColor = #colorLiteral(red: 0.4588235294, green: 0.1960784314, blue: 0.07843137255, alpha: 1) + $0.layer.borderColor = #colorLiteral(red: 0.0549, green: 0.2471, blue: 0.2549, alpha: 1) $0.layer.masksToBounds = false - $0.layer.shadowColor = #colorLiteral(red: 0.337254902, green: 0.1411764706, blue: 0.06666666667, alpha: 1) + $0.layer.shadowColor = #colorLiteral(red: 0.0549, green: 0.2471, blue: 0.2549, alpha: 1) $0.layer.shadowOpacity = 1 - $0.layer.shadowOffset = CGSize(width: 0, height: 12) + $0.layer.shadowOffset = CGSize(width: 0, height: 5) + $0.layer.shadowRadius = 0 + } + private let pointShopScanButton = HIButton { + $0.tintHIColor = \.action + $0.backgroundHIColor = \.scannerButtonOrangeBrown + $0.layer.borderWidth = 4.0 + $0.layer.borderColor = #colorLiteral(red: 0.5490, green: 0.2157, blue: 0.0745, alpha: 1) // #8C3713 + // 3D Effect + $0.layer.masksToBounds = false + $0.layer.shadowColor = #colorLiteral(red: 0.5490, green: 0.2157, blue: 0.0745, alpha: 1) + $0.layer.shadowOpacity = 1 + $0.layer.shadowOffset = CGSize(width: 0, height: 5) $0.layer.shadowRadius = 0 } @objc dynamic override func setUpBackgroundView() { @@ -61,7 +73,7 @@ class HIQRScannerSelection: HIBaseViewController { if UIDevice.current.userInterfaceIdiom == .pad { backgroundView.image = #imageLiteral(resourceName: "BackgroundShifts") } else { - backgroundView.image = #imageLiteral(resourceName: "Staff") + backgroundView.image = #imageLiteral(resourceName: "scanner-menu") } } } @@ -86,6 +98,7 @@ extension HIQRScannerSelection { } else if user.roles.contains(.STAFF) { view.addSubview(meetingButton) view.addSubview(attendeeButton) + view.addSubview(pointShopScanButton) view.addSubview(closeButton) view.addSubview(label) // Add constraints for meetingButton and attendeeButton here @@ -100,6 +113,13 @@ extension HIQRScannerSelection { attendeeButton.addTarget(self, action: #selector(didSelectAttendeeButton(_:)), for: .touchUpInside) attendeeButton.layer.cornerRadius = (UIDevice.current.userInterfaceIdiom == .pad) ? 30 : 15 attendeeButton.constrain(width: (UIDevice.current.userInterfaceIdiom == .pad) ? 500 : 290, height: (UIDevice.current.userInterfaceIdiom == .pad) ? 150 : 80) + + pointShopScanButton.topAnchor.constraint(equalTo: attendeeButton.bottomAnchor, constant: (UIDevice.current.userInterfaceIdiom == .pad) ? 100 : 50).isActive = true + pointShopScanButton.centerXAnchor.constraint(equalTo: view.safeAreaLayoutGuide.centerXAnchor).isActive = true + pointShopScanButton.addTarget(self, action: #selector(didSelectPointsShopButton(_:)), for: .touchUpInside) + pointShopScanButton.layer.cornerRadius = (UIDevice.current.userInterfaceIdiom == .pad) ? 30 : 15 + pointShopScanButton.constrain(width: (UIDevice.current.userInterfaceIdiom == .pad) ? 500 : 290, height: (UIDevice.current.userInterfaceIdiom == .pad) ? 150 : 80) + let meetingLabel = HILabel(style: .QRSelection) meetingLabel.text = "Meeting Attendance" meetingButton.addSubview(meetingLabel) @@ -110,14 +130,21 @@ extension HIQRScannerSelection { attendeeButton.addSubview(attendanceLabel) attendanceLabel.centerYAnchor.constraint(equalTo: attendeeButton.centerYAnchor).isActive = true attendanceLabel.centerXAnchor.constraint(equalTo: attendeeButton.centerXAnchor).isActive = true + + let pointsShopLabel = HILabel(style: .QRSelection) + pointsShopLabel.text = "Points Shop" + pointShopScanButton.addSubview(pointsShopLabel) + pointsShopLabel.centerYAnchor.constraint(equalTo: pointShopScanButton.centerYAnchor).isActive = true + pointsShopLabel.centerXAnchor.constraint(equalTo: pointShopScanButton.centerXAnchor).isActive = true } closeButton.addTarget(self, action: #selector(didSelectCloseButton(_:)), for: .touchUpInside) closeButton.topAnchor.constraint(equalTo: view.safeAreaLayoutGuide.topAnchor, constant: 10).isActive = true closeButton.leadingAnchor.constraint(equalTo: view.safeAreaLayoutGuide.leadingAnchor, constant: 8).isActive = true closeButton.constrain(width: 60, height: 60) closeButton.imageView?.contentMode = .scaleToFill - let label = HILabel(style: (UIDevice.current.userInterfaceIdiom == .pad) ? .viewTitleBrown : .viewTitleBrown) + let label = HILabel(style: (UIDevice.current.userInterfaceIdiom == .pad) ? .viewTitle : .viewTitle) label.text = "SCANNER" + label.textHIColor = \.whiteText view.addSubview(label) label.centerYAnchor.constraint(equalTo: closeButton.centerYAnchor).isActive = true label.leadingAnchor.constraint(equalTo: closeButton.trailingAnchor, constant: 3).isActive = true @@ -183,3 +210,13 @@ extension HIQRScannerSelection { self.present(scanQRCodePopup, animated: true, completion: nil) } } + +extension HIQRScannerSelection { + @objc func didSelectPointsShopButton(_ sender: HIButton) { + let scanQRCodePopup = HIScanPointsShopViewController() + scanQRCodePopup.modalPresentationStyle = .overFullScreen + scanQRCodePopup.modalTransitionStyle = .crossDissolve + self.present(scanQRCodePopup, animated: true, completion: nil) + } +} +