From 54d303de7898da0087d94e3cb2f3307970a5b96c Mon Sep 17 00:00:00 2001 From: Sophia Liu Date: Sat, 17 Feb 2024 14:16:14 -0600 Subject: [PATCH] Wrap up QR scanner + UI fixes --- .../BookmarkSelected1x.png | Bin 0 -> 313 bytes .../BookmarkSelected2x.png | Bin 0 -> 528 bytes .../BookmarkSelected3x.png | Bin 0 -> 710 bytes .../BookmarkSelected.imageset/Contents.json | 23 +++++++++++++++++ .../BookmarkUnselected.png | Bin 0 -> 417 bytes .../BookmarkUnselected2x.png | Bin 0 -> 682 bytes .../BookmarkUnselected3x.png | Bin 0 -> 905 bytes .../BookmarkUnselected.imageset/Contents.json | 23 +++++++++++++++++ .../HIBaseViewController.swift | 2 +- .../HIPointsShopSwiftUIView.swift | 2 +- .../ViewControllers/HIProfileCardView.swift | 2 +- .../HIQRScannerSelection.swift | 4 +-- .../HIScanMentorViewController.swift | 2 ++ .../HIScanPointsShopViewController.swift | 2 ++ .../HIScheduleViewController.swift | 24 +++++++++--------- 15 files changed, 67 insertions(+), 17 deletions(-) create mode 100644 HackIllinois/Assets.xcassets/BookmarkSelected.imageset/BookmarkSelected1x.png create mode 100644 HackIllinois/Assets.xcassets/BookmarkSelected.imageset/BookmarkSelected2x.png create mode 100644 HackIllinois/Assets.xcassets/BookmarkSelected.imageset/BookmarkSelected3x.png create mode 100644 HackIllinois/Assets.xcassets/BookmarkSelected.imageset/Contents.json create mode 100644 HackIllinois/Assets.xcassets/BookmarkUnselected.imageset/BookmarkUnselected.png create mode 100644 HackIllinois/Assets.xcassets/BookmarkUnselected.imageset/BookmarkUnselected2x.png create mode 100644 HackIllinois/Assets.xcassets/BookmarkUnselected.imageset/BookmarkUnselected3x.png create mode 100644 HackIllinois/Assets.xcassets/BookmarkUnselected.imageset/Contents.json diff --git a/HackIllinois/Assets.xcassets/BookmarkSelected.imageset/BookmarkSelected1x.png b/HackIllinois/Assets.xcassets/BookmarkSelected.imageset/BookmarkSelected1x.png new file mode 100644 index 0000000000000000000000000000000000000000..29c822d5ccab96af4c7e28f54dc7d6e859a8f463 GIT binary patch literal 313 zcmeAS@N?(olHy`uVBq!ia0vp^8X(NU1|)m_?Z^dEoCO|{#S9GG!XV7ZFl&wkP>``W z$lZxy-8q?;Kn_c~qpu?a!^VE@KZ&eB{y9$<$B+ufw=*0?n;b-3|3@6?bYRI{z}w@% zq9oABmc*3nz@jYSC{-ixeuuI7&-$Euw$J6vKJ2(HDd^N88+!Mk+ut4KvmY_G8T|;U z-*r~!>wjOXKrV@+^Kaz)8>xQ~FO=W5Qv4aqIxgn51{bgqUFi>a@Ge##ee-v`<&ft{gYc+v=8ua`Opt!mR5X@Y!|raTauP~C&KpQreo>J ztW$P1TK|uTi2d|7de!!TeT{PO554N1{?yo9O>5&J(__E47+qY+K4t1JLCZ)M5y1c# z2SG+x8ZgdUKA3!d>G@mF52j`1F@9dWyxi`&VvF|t^!eiRU(`qcii!Td;mb#lyVgP> zx&Q0gY! zFZ0<1Z&|tYKC@T0)|~7URqnHI@iTtz&ddA%Ya6dkeBJ!B$DVI(Ysmf8ZYrz&c76Gl nm0#OurT8BIwe8+TaM)VO%Ze?Ze|^sG$sn$$tDnm{r-UW|SAWl% literal 0 HcmV?d00001 diff --git a/HackIllinois/Assets.xcassets/BookmarkSelected.imageset/BookmarkSelected3x.png b/HackIllinois/Assets.xcassets/BookmarkSelected.imageset/BookmarkSelected3x.png new file mode 100644 index 0000000000000000000000000000000000000000..06cd944328d3cd2fa0e162e1d88ae7e581459e04 GIT binary patch literal 710 zcmeAS@N?(olHy`uVBq!ia0vp^6(G#P1|%(0%q{^b&H|6fVg?393lL^>oo1K-6l5$8 za(7}_cTVOdki(Mh=o8i(^OyI|-&@(FxC?3xEl8mujHc)#%^|9g{N!W#X0w&h~>iV0iX+`mm$1{w_o zJt4x(C(jtmE}Qj!RyeRIgl-e;?o@)xDYFKT*w`8Hcw*?onoaMcYlEZ=+= zHAOYvKCmx8&~a*c!S{=XA6o7m+fYKI`;3+4{5u=lA&) z?+?Xgr}JF z-(rn@wePMAeiU-UzC3L*R?$<^3olml@-8Qk}-_}3VVOv(5VQPHV%3nlp(;Y4CH4lR-AN}GJubgx6TER-4 znEMYO9eDlMAbUrM+|GT6k4j(Pd5V8eoA*=3*VZvlKKsA6vA-y#H+B7*_XQipzXh*< s81(ZDQ1`m*9ar*d*``W z$lZxy-8q?;Kn_c~qpu?a!^VE@KZ&eBIWtce$B+ufw=*949ySnYjTiX;ku9aAZ-U@1 z#+wW7Hk38zIhZB19AN30V8nR$L52GtMbl38|6Zc*9#~WN>Ey+^jK>S#be!mV zwNyr4N?0{v!K`1CK4qM-+WIf{meRHmhf1fOzv|yTj7`7$m2UXxV*2r?;@85ygPP8v zp|U&%YtPPkUmR2ud}o2EdB#!RsKVwj81v_Mw&!AN!V?u&P5s{XYstNc8*+gRn-4}P zt~Z?aDe=?3#~Zdw#m-4Gb^BTql3Q>uV(S%!^|O{$vb6->ax7aTC>Zw1TBd-7|E^*YT(TfS5_gv=IteQW7nWv|}~4)qt#zPz(L_xRVJpL71)KcB|Q zSeD73YZX>?|DNE|r>>%zmp8_3EpLHFwhgnuRQ+v*)$jU%NsGbL)z4*}Q$iB}0PiJI literal 0 HcmV?d00001 diff --git a/HackIllinois/Assets.xcassets/BookmarkUnselected.imageset/BookmarkUnselected3x.png b/HackIllinois/Assets.xcassets/BookmarkUnselected.imageset/BookmarkUnselected3x.png new file mode 100644 index 0000000000000000000000000000000000000000..932076069ac402a2af856e39f0f788038dd92e90 GIT binary patch literal 905 zcmeAS@N?(olHy`uVBq!ia0vp^6(G#P1|%(0%q{^b&H|6fVg?393lL^>oo1K-6l5$8 za(7}_cTVOdki(Mh=eyjk~H;mGOK@9&=7{yx+4af*+^^y@Ml|00Zm zhC_j{>E^~AzeE3Q?D#2EENg78yE`o|ZS&1j%TylSJNoC-%NxgZa=0EX_-+^bec74i zvfD#ViZ(t^SRa1nQov8a^QZm898MmHzFe(1HCz6(rqcVh>GEqDo-HrW%hz7$^= zcPu8_UFiMf1Crk_uX`Ai{XU^~`MsGdUwl6B@0--QtzWsXmA{%hqsxx(&GYpSW4!H+ zOJ4EL?$YCbQ+i|T^zGk{e4Sg>9Cl#EI=iY@kEVQldX;tR`=ou*wS`X=-zLc=n|*xy zuCMmc(&uk4tzbSr{q7O@?P2i=RWCLiUy~%q?=1YI<=X+@8`at+Q{V9AB*i_t9Um$$ z@M8xkW&g85%$5Ce3^NvD)|NlV{iGzY48N&ktXw@S*bGnuis4%%&}@EZn}q>GkXbnSMZj zF1=RXdBC;8{+i+TYn!ubkN^21H-qcF-`9PgFTDlZ?NAlH9 zt2{IL`v1ozg24}eUW-fMeg292`u3F{KJ#pAE3SO@%S^QMx$Ie~b5GOPmy50BSJP5;+-tw66nxpsC}^M?0TK+VdpZ-=Y^I^*pxGgvBSV0dvpf75-l TU1Hx=oj`(~u6{1-oD!M [String: AnyObject]? { diff --git a/HackIllinois/ViewControllers/HIScanPointsShopViewController.swift b/HackIllinois/ViewControllers/HIScanPointsShopViewController.swift index 5a8fdbab..e87cf9e1 100644 --- a/HackIllinois/ViewControllers/HIScanPointsShopViewController.swift +++ b/HackIllinois/ViewControllers/HIScanPointsShopViewController.swift @@ -296,6 +296,8 @@ extension HIScanPointsShopViewController: AVCaptureMetadataOutputObjectsDelegate } .authorize(with: HIApplicationStateController.shared.user) .launch() + } else { + self.handlePointsShopAlert(status: "Error", itemName: "") } } func decode(_ token: String) -> [String: AnyObject]? { diff --git a/HackIllinois/ViewControllers/HIScheduleViewController.swift b/HackIllinois/ViewControllers/HIScheduleViewController.swift index 3fb4a066..503b57b6 100644 --- a/HackIllinois/ViewControllers/HIScheduleViewController.swift +++ b/HackIllinois/ViewControllers/HIScheduleViewController.swift @@ -101,7 +101,7 @@ extension HIScheduleViewController { onlyFavorites = !onlyFavorites sender.image = onlyFavorites ? #imageLiteral(resourceName: "Big Selected Bookmark") : #imageLiteral(resourceName: "Big Unselected Bookmark") if UIDevice.current.userInterfaceIdiom == .pad { - sender.image = onlyFavorites ? #imageLiteral(resourceName: "FavoritedPad") : #imageLiteral(resourceName: "UnFavoritedPad") + sender.image = onlyFavorites ? #imageLiteral(resourceName: "BookmarkSelected") : #imageLiteral(resourceName: "BookmarkUnselected") } if sender.image == #imageLiteral(resourceName: "Big Selected Bookmark") { super.setCustomTitle(customTitle: "SAVED EVENTS") @@ -203,7 +203,7 @@ extension HIScheduleViewController { extension HIScheduleViewController { @objc func setStaffShiftsControl() { - let customFontSize = UIDevice.current.userInterfaceIdiom == .pad ? 44 : 24 + let customFontSize = UIDevice.current.userInterfaceIdiom == .pad ? 48 : 24 let customFont = UIFont(name: "MontserratRoman-Bold", size: CGFloat(customFontSize)) // Create flexible space items to add space to the left @@ -309,9 +309,9 @@ extension HIScheduleViewController { continue } // Set fixed width and height for the container view - let containerViewWidth: CGFloat = (UIDevice.current.userInterfaceIdiom == .pad) ? 620 : 340.0 - let containerViewHeight: CGFloat = (UIDevice.current.userInterfaceIdiom == .pad) ? 200 : 130.0 - + let containerViewWidth: CGFloat = UIScreen.main.bounds.width > 850 ? 820 : ((UIDevice.current.userInterfaceIdiom == .pad) ? 620 : 340.0) + let containerViewHeight: CGFloat = UIScreen.main.bounds.width > 850 ? 250 : ((UIDevice.current.userInterfaceIdiom == .pad) ? 200 : 130.0) + // Create a container view with a yellow background let containerView = UIView() containerView.translatesAutoresizingMaskIntoConstraints = false @@ -353,9 +353,9 @@ extension HIScheduleViewController { containerView.addSubview(timeImageView) timeImageView.translatesAutoresizingMaskIntoConstraints = false timeImageView.leadingAnchor.constraint(equalTo: label.leadingAnchor).isActive = true - timeImageView.bottomAnchor.constraint(equalTo: label.bottomAnchor, constant: (UIDevice.current.userInterfaceIdiom == .pad ? 40.0 : 25.0)).isActive = true + timeImageView.bottomAnchor.constraint(equalTo: label.bottomAnchor, constant: UIScreen.main.bounds.width > 850 ? 50 : ((UIDevice.current.userInterfaceIdiom == .pad) ? 40 : 25.0)).isActive = true containerView.addSubview(timeLabel) - timeLabel.leadingAnchor.constraint(equalTo: timeImageView.trailingAnchor, constant: eventCellSpacing + 1).isActive = true + timeLabel.leadingAnchor.constraint(equalTo: timeImageView.trailingAnchor, constant: eventCellSpacing).isActive = true timeLabel.centerYAnchor.constraint(equalTo: timeImageView.centerYAnchor).isActive = true // Location label set up @@ -368,8 +368,8 @@ extension HIScheduleViewController { containerView.addSubview(locationImageView) locationImageView.translatesAutoresizingMaskIntoConstraints = false containerView.addSubview(locationLabel) - locationImageView.leadingAnchor.constraint(equalTo: timeImageView.leadingAnchor, constant: (UIDevice.current.userInterfaceIdiom == .pad ? 2.0 : 1.0)).isActive = true - locationImageView.bottomAnchor.constraint(equalTo: timeImageView.bottomAnchor, constant: (UIDevice.current.userInterfaceIdiom == .pad ? 40.0 : 25.0)).isActive = true + locationImageView.leadingAnchor.constraint(equalTo: timeImageView.leadingAnchor, constant: (UIDevice.current.userInterfaceIdiom == .pad ? 5.0 : 1.0)).isActive = true + locationImageView.bottomAnchor.constraint(equalTo: timeImageView.bottomAnchor, constant: UIScreen.main.bounds.width > 850 ? 50 : ((UIDevice.current.userInterfaceIdiom == .pad) ? 40 : 25.0)).isActive = true locationLabel.leadingAnchor.constraint(equalTo: timeLabel.leadingAnchor).isActive = true locationLabel.centerYAnchor.constraint(equalTo: locationImageView.centerYAnchor).isActive = true @@ -380,8 +380,8 @@ extension HIScheduleViewController { containerView.addSubview(descriptionLabel) descriptionLabel.translatesAutoresizingMaskIntoConstraints = false descriptionLabel.leadingAnchor.constraint(equalTo: locationImageView.leadingAnchor).isActive = true - descriptionLabel.bottomAnchor.constraint(equalTo: locationImageView.bottomAnchor, constant: (UIDevice.current.userInterfaceIdiom == .pad ? 40.0 : 25.0)).isActive = true - padding += (UIDevice.current.userInterfaceIdiom == .pad ? 240.0 : 150.0) + descriptionLabel.bottomAnchor.constraint(equalTo: locationImageView.bottomAnchor, constant: UIScreen.main.bounds.width > 850 ? 50 : ((UIDevice.current.userInterfaceIdiom == .pad) ? 40 : 25.0)).isActive = true + padding += UIScreen.main.bounds.width > 850 ? 300 : ((UIDevice.current.userInterfaceIdiom == .pad) ? 240 : 150.0) } } } @@ -394,7 +394,7 @@ extension HIScheduleViewController { if !HIApplicationStateController.shared.isGuest { navigationItem.rightBarButtonItem = UIBarButtonItem(image: #imageLiteral(resourceName: "MenuUnfavorited"), style: .plain, target: self, action: #selector(didSelectFavoritesIcon(_:))) if UIDevice.current.userInterfaceIdiom == .pad { - navigationItem.rightBarButtonItem = UIBarButtonItem(image: #imageLiteral(resourceName: "UnFavoritedPad"), style: .plain, target: self, action: #selector(didSelectFavoritesIcon(_:))) + navigationItem.rightBarButtonItem = UIBarButtonItem(image: #imageLiteral(resourceName: "BookmarkUnselected"), style: .plain, target: self, action: #selector(didSelectFavoritesIcon(_:))) } } }