diff --git a/RaceSync/Assets.xcassets/icn_settings_beta.imageset/Contents.json b/RaceSync/Assets.xcassets/icn_settings_github.imageset/Contents.json similarity index 72% rename from RaceSync/Assets.xcassets/icn_settings_beta.imageset/Contents.json rename to RaceSync/Assets.xcassets/icn_settings_github.imageset/Contents.json index f80e1861..0b030510 100644 --- a/RaceSync/Assets.xcassets/icn_settings_beta.imageset/Contents.json +++ b/RaceSync/Assets.xcassets/icn_settings_github.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "icn_settings_beta.pdf", + "filename" : "icn_settings_github.pdf", "idiom" : "universal" } ], diff --git a/RaceSync/Assets.xcassets/icn_settings_github.imageset/icn_settings_github.pdf b/RaceSync/Assets.xcassets/icn_settings_github.imageset/icn_settings_github.pdf new file mode 100644 index 00000000..d3b0cc30 Binary files /dev/null and b/RaceSync/Assets.xcassets/icn_settings_github.imageset/icn_settings_github.pdf differ diff --git a/RaceSync/Assets.xcassets/icn_settings_testflight.imageset/Contents.json b/RaceSync/Assets.xcassets/icn_settings_testflight.imageset/Contents.json new file mode 100644 index 00000000..e4c2e6e1 --- /dev/null +++ b/RaceSync/Assets.xcassets/icn_settings_testflight.imageset/Contents.json @@ -0,0 +1,12 @@ +{ + "images" : [ + { + "filename" : "icn_settings_testflight.pdf", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/RaceSync/Assets.xcassets/icn_settings_beta.imageset/icn_settings_beta.pdf b/RaceSync/Assets.xcassets/icn_settings_testflight.imageset/icn_settings_testflight.pdf similarity index 100% rename from RaceSync/Assets.xcassets/icn_settings_beta.imageset/icn_settings_beta.pdf rename to RaceSync/Assets.xcassets/icn_settings_testflight.imageset/icn_settings_testflight.pdf diff --git a/RaceSync/Constants/AppWebConstants.swift b/RaceSync/Constants/AppWebConstants.swift index 1ed5c492..6fa36f17 100644 --- a/RaceSync/Constants/AppWebConstants.swift +++ b/RaceSync/Constants/AppWebConstants.swift @@ -23,7 +23,8 @@ public class AppWebConstants { static let livefpv = "https://livefpv.com/" static let fpvscores = "https://fpvscores.com/" - static let betaSignup = "https://testflight.apple.com/join/BRXIQJLb" + static let testflight = "https://testflight.apple.com/join/BRXIQJLb" + static let github = "https://github.com/MultiGP/racesync-ios" } enum AppWeb: Int { diff --git a/RaceSync/View Controllers/Settings/SettingsViewController.swift b/RaceSync/View Controllers/Settings/SettingsViewController.swift index acf99104..49ed2ab7 100644 --- a/RaceSync/View Controllers/Settings/SettingsViewController.swift +++ b/RaceSync/View Controllers/Settings/SettingsViewController.swift @@ -97,13 +97,13 @@ class SettingsViewController: UIViewController { func loadSections() { sections = { - let resources: [Row] = [.tracksGuide, .buildGuide, .seasonRules, .visitSite] + let resources: [Row] = [.buildGuide, .seasonRules, .visitSite] var auth: [Row] = [.logout] if let user = APIServices.shared.myUser, user.isDevTeam, isDevModeEnabled { auth += [.switchEnv] } - var about: [Row] = [.feedback, .joinBeta] + var about: [Row] = [.feedback, .joinBeta, .viewProject] if UIApplication.shared.supportsAlternateIcons { about += [.appicon] } return [.notifications: [Row.notifications], .resources: resources, .about: about, .auth: auth] @@ -216,7 +216,9 @@ extension SettingsViewController: UITableViewDelegate { vc.title = row.title navigationController?.pushViewController(vc, animated: true) case .joinBeta: - WebViewController.open(AppWebConstants.betaSignup) + WebViewController.open(AppWebConstants.testflight) + case .viewProject: + WebViewController.open(AppWebConstants.github) case .visitSite: WebViewController.open(AppWebConstants.homepage) case .logout: @@ -281,6 +283,8 @@ extension SettingsViewController: UITableViewDataSource { cell.detailTextLabel?.text = icon.title } else if row == .joinBeta { cell.detailTextLabel?.text = "Testflight" + } else if row == .viewProject { + cell.detailTextLabel?.text = "Github" } else if row == .logout { cell.detailTextLabel?.text = APISessionManager.getSessionEmail() } else if row == .switchEnv { @@ -311,6 +315,7 @@ fileprivate enum Row: Int, EnumTitle { case visitSite case feedback case joinBeta + case viewProject case appicon case logout case switchEnv @@ -324,6 +329,7 @@ fileprivate enum Row: Int, EnumTitle { case .visitSite: return "Visit MultiGP.com" case .feedback: return "Share Feedback" case .joinBeta: return "Join the Beta" + case .viewProject: return "View Project" case .appicon: return "Change App Icon" case .logout: return "Logout" case .switchEnv: return "Switch to" @@ -339,7 +345,8 @@ fileprivate enum Row: Int, EnumTitle { case .seasonRules: return "icn_settings_handbook" case .visitSite: return "icn_settings_mgp" case .feedback: return "icn_settings_feedback" - case .joinBeta: return "icn_settings_beta" + case .joinBeta: return "icn_settings_testflight" + case .viewProject: return "icn_settings_github" case .appicon: return "icn_settings_appicn" case .logout: return "icn_settings_logout" case .switchEnv: return "icn_settings_logout"