Skip to content
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
7 changes: 4 additions & 3 deletions ci_scripts/ci_post_clone.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@
# score-ios
#
# Created by Hsia Lu wu on 3/5/25.
#
#

echo "Downloading Secrets"
brew install wget
cd $CI_PRIMARY_REPOSITORY_PATH/ci_scripts
mkdir ../ScoreSecrets
wget -O ../score_ios/ScoreSecrets/Keys.xcconfig "$KEYS"
wget -O ../score_ios/ScoreSecrets/apollo-codegen-config-dev.json "$CODEGEN_DEV"
wget -O ../score_ios/ScoreSecrets/apollo-codegen-config-prod.json "$CODEGEN_PROD"
wget -O ../ScoreSecrets/Keys.xcconfig "$KEYS"
wget -O ../ScoreSecrets/apollo-codegen-config-dev.json "$CODEGEN_DEV"
wget -O ../ScoreSecrets/apollo-codegen-config-prod.json "$CODEGEN_PROD"

echo "Generating API file"
../apollo-ios-cli generate -p "../ScoreSecrets/apollo-codegen-config-prod.json" -f
85 changes: 62 additions & 23 deletions score-ios.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1510"
LastUpgradeVersion = "1620"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1510"
LastUpgradeVersion = "1620"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
6 changes: 6 additions & 0 deletions score-ios/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIUserInterfaceStyle</key>
<string>Light</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>SCORE_DEV_URL</key>
<string>$(SCORE_DEV_URL)</string>
<key>SCORE_PROD_URL</key>
Expand Down
2 changes: 1 addition & 1 deletion score-ios/Models/BoxScoreUpdate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct BoxScoreItem: Decodable {
if let item = item {
self.team = item.team ?? ""
self.period = item.period ?? ""
self.time = item.time ?? ""
self.time = item.time ?? "--:--"
self.description = item.description ?? "N/A"
self.scorer = item.scorer ?? ""
self.assist = item.assist ?? ""
Expand Down
16 changes: 8 additions & 8 deletions score-ios/Models/DummyData.swift

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions score-ios/Models/Game.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,24 +85,24 @@ extension Game {
// Parse breakdown and map into `TimeUpdate` array
// [["1", "2"], ["2", "3"]]

if (breakdown != nil) {
let scoreBreakDown = breakdown!
if let breakdown {
let scoreBreakDown = breakdown
let corScores = scoreBreakDown[0]
let oppScores = scoreBreakDown[1]
var corTotal = 0
var oppTotal = 0
if (corScores != nil && oppScores != nil) {
corScores!.indices.forEach({ index in
let timeStamp = index+1
if (corScores![index] != nil && oppScores![index] != nil) {
let corScore = Int(corScores![index]!) ?? 0
let oppScore = Int(oppScores![index]!) ?? 0
if let corScores, let oppScores {
corScores.indices.forEach({ index in
let timeStamp = index + 1
if let corScore = corScores[index], let oppScore = oppScores[index] {
let corScore = Int(corScore) ?? 0
let oppScore = Int(oppScore) ?? 0
let timeUpdate = TimeUpdate(timestamp: timeStamp, isTotal: false, cornellScore: corScore, opponentScore: oppScore)
corTotal += corScore
oppTotal += oppScore
updates.append(timeUpdate)
}
if (index == corScores!.count - 1) {
if (index == corScores.count - 1) {
let total = TimeUpdate(timestamp: index + 1, isTotal: true, cornellScore: corTotal, opponentScore: oppTotal)
updates.append(total)
}
Expand Down
1 change: 1 addition & 0 deletions score-ios/Models/Sex.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ enum Sex : Identifiable, CaseIterable, CustomStringConvertible {
return "Womens"
}
}

// This is strictly for filtering purposes, all datum should have one of Men or Women
static func index(of sex: Sex) -> Int? {
return allCases.firstIndex(of: sex)
Expand Down
78 changes: 39 additions & 39 deletions score-ios/Models/Sport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,33 @@ enum Sport : String, Identifiable, CaseIterable, CustomStringConvertible {
case All

// Both
case Basketball
case CrossCountry
// case Basketball
// case CrossCountry
case IceHockey
case Lacrosse
case Soccer
case Squash
// case Squash
// case SwimmingDiving
case Tennis
// case Tennis
// case TrackField

// Women
case Fencing
// case Fencing
case FieldHockey
case Gymnastics
case Rowing
case Sailing
case Softball
case Volleyball
// case Gymnastics
// case Rowing
// case Sailing
// case Softball
// case Volleyball

// Men
case Baseball
case Football
case Golf
// case Golf
// case RowingHeavyweight
// case RowingLightweight
case SprintFootball
case Wrestling
// case SprintFootball
// case Wrestling

// init from a string from backend (might include spaces)
init?(normalizedValue: String) {
Expand All @@ -60,52 +60,52 @@ enum Sport : String, Identifiable, CaseIterable, CustomStringConvertible {
switch self {
case .All:
return "All"
case .Basketball:
return "Basketball"
case .CrossCountry:
return "Cross Country"
// case .Basketball:
// return "Basketball"
// case .CrossCountry:
// return "Cross Country"
case .IceHockey:
return "Ice Hockey"
case .Lacrosse:
return "Lacrosse"
case .Soccer:
return "Soccer"
case .Squash:
return "Squash"
// case .Squash:
// return "Squash"
// case .SwimmingDiving:
// return "Swimming"
case .Tennis:
return "Tennis"
// case .Tennis:
// return "Tennis"
// case .TrackField:
// return "Track and Field"
case .Fencing:
return "Fencing"
// case .Fencing:
// return "Fencing"
case .FieldHockey:
return "Field Hockey"
case .Gymnastics:
return "Gymnastics"
case .Rowing:
return "Rowing"
case .Sailing:
return "Sailing"
case .Softball:
return "Softball"
case .Volleyball:
return "Volleyball"
// case .Gymnastics:
// return "Gymnastics"
// case .Rowing:
// return "Rowing"
// case .Sailing:
// return "Sailing"
// case .Softball:
// return "Softball"
// case .Volleyball:
// return "Volleyball"
case .Baseball:
return "Baseball"
case .Football:
return "Football"
case .Golf:
return "Golf"
// case .Golf:
// return "Golf"
// case .RowingHeavyweight:
// return "HW Rowing"
// case .RowingLightweight:
// return "LW Rowing"
case .SprintFootball:
return "Sprint Football"
case .Wrestling:
return "Wrestling"
// case .SprintFootball:
// return "Sprint Football"
// case .Wrestling:
// return "Wrestling"
}
}
}
Expand Down
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.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "AppIcon.png",
"filename" : "AppIcon.jpg",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
Expand Down
38 changes: 31 additions & 7 deletions score-ios/Utils/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ struct Constants {
static let primary_red = Color(hex: 0xA5210D)
static let gradient_red = Color(red: 179 / 255, green: 27 / 255, blue: 27 / 255, opacity: 0.4)
static let gradient_blue = Color(red: 1 / 255, green: 31 / 255, blue: 91 / 255, opacity: 0.4)

static let crimson = Color(hex: 0xA5210D)

// Customs
static let selected = primary_red
static let selectedText = white
Expand All @@ -43,9 +44,32 @@ struct Constants {

}

enum Fonts {
static let h1 = Font.custom("Poppins Medium", size: 24)
static let h2 = Font.custom("Poppins SemiBold", size: 18)
struct Fonts {
// Header fonts
struct Header {
static let h1 = Font.custom("Poppins SemiBold", size: 24)
static let h2 = Font.custom("Poppins Medium", size: 18)
static let h3 = Font.custom("Poppins Medium", size: 14)
static let h4 = Font.custom("Poppins Medium", size: 12)
}

// Body fonts
struct Body {
static let light = Font.custom("Poppins Light", size: 14)
static let normal = Font.custom("Poppins Regular", size: 14)
static let medium = Font.custom("Poppins Medium", size: 14)
static let semibold = Font.custom("Poppins SemiBold", size: 14)
static let bold = Font.custom("Poppins Bold", size: 14)
}

// Label fonts
struct Label {
static let light = Font.custom("Poppins Light", size: 12)
static let normal = Font.custom("Poppins Regular", size: 12)
static let medium = Font.custom("Poppins Medium", size: 12)
static let semibold = Font.custom("Poppins SemiBold", size: 12)
}

static let countdownNum = Font.custom("Poppins Medium", size: 36)
static let gameScore = Font.custom("Poppins SemiBold", size: 18)
static let gameTitle = Font.custom("Poppins Medium", size: 18)
Expand All @@ -60,10 +84,10 @@ struct Constants {
static let medium18 = Font.custom("Poppins Medium", size: 18)
static let regular14 = Font.custom("Poppins Regular", size: 14)
static let bold40 = Font.custom("Poppins Bold", size: 40)

static let title = Font.system(size: 36, weight: .bold, design: .default)
static let header = Font.system(size: 24, weight: .bold, design: .default)
static let subheader = Font.system(size: 18, weight: .bold, design: .default)
static let header = Font.system(size: 24, weight: .semibold, design: .default)
static let subheader = Font.system(size: 18, weight: .semibold, design: .default)
static let bodyBold = Font.system(size: 16, weight: .semibold, design: .default)
static let body = Font.system(size: 16, weight: .regular, design: .default)
static let caption = Font.system(size: 12, weight: .regular, design: .default)
Expand Down
Loading