Skip to content
Open
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "icn_settings_beta.pdf",
"filename" : "icn_settings_github.pdf",
"idiom" : "universal"
}
],
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"images" : [
{
"filename" : "icn_settings_testflight.pdf",
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
3 changes: 2 additions & 1 deletion RaceSync/Constants/AppWebConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
15 changes: 11 additions & 4 deletions RaceSync/View Controllers/Settings/SettingsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -311,6 +315,7 @@ fileprivate enum Row: Int, EnumTitle {
case visitSite
case feedback
case joinBeta
case viewProject
case appicon
case logout
case switchEnv
Expand All @@ -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"
Expand All @@ -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"
Expand Down