diff --git a/RIT Dining.xcodeproj/project.pbxproj b/RIT Dining.xcodeproj/project.pbxproj index 2dab951..a26da12 100644 --- a/RIT Dining.xcodeproj/project.pbxproj +++ b/RIT Dining.xcodeproj/project.pbxproj @@ -265,7 +265,7 @@ CODE_SIGN_ENTITLEMENTS = "RIT Dining/RIT Dining.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 15; + CURRENT_PROJECT_VERSION = 16; DEVELOPMENT_TEAM = 5GF7GKNTK4; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; @@ -300,7 +300,7 @@ CODE_SIGN_ENTITLEMENTS = "RIT Dining/RIT Dining.entitlements"; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 15; + CURRENT_PROJECT_VERSION = 16; DEVELOPMENT_TEAM = 5GF7GKNTK4; ENABLE_PREVIEWS = YES; GENERATE_INFOPLIST_FILE = YES; diff --git a/RIT Dining/Views/AboutView.swift b/RIT Dining/Views/AboutView.swift index 9ca0805..9a623f2 100644 --- a/RIT Dining/Views/AboutView.swift +++ b/RIT Dining/Views/AboutView.swift @@ -13,34 +13,41 @@ struct AboutView: View { let buildNumber: String = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as! String var body: some View { - VStack { + VStack(alignment: .leading) { Image("Icon") .resizable() .frame(width: 128, height: 128) .clipShape(RoundedRectangle(cornerRadius: 20)) - Text("RIT Dining App") + Text("An RIT Dining App") .font(.title) - Text("because the RIT dining website is slow!") Text("Version \(appVersionString) (\(buildNumber))") .foregroundStyle(.secondary) - Text("The RIT Dining app is powered by the TigerCenter API. Dining location occupancy information is sourced from the RIT maps API.") - .multilineTextAlignment(.center) + VStack(alignment: .leading, spacing: 10) { + Text("Dining locations, their descriptions, and their opening hours are sourced from the RIT student-run TigerCenter API. Building occupancy information is sourced from the official RIT maps API.") + Text("This app is not affiliated, associated, authorized, endorsed by, or in any way officially connected with the Rochester Institute of Technology. This app is student created and maintained.") + HStack { + Button(action: { + openURL(URL(string: "https://github.com/NinjaCheetah/RIT-Dining")!) + }) { + Text("Source Code") + } + Text("•") + .foregroundStyle(.secondary) + Button(action: { + openURL(URL(string: "https://tigercenter.rit.edu/")!) + }) { + Text("TigerCenter") + } + Text("•") + .foregroundStyle(.secondary) + Button(action: { + openURL(URL(string: "https://maps.rit.edu/")!) + }) { + Text("Official RIT Map") + } + } + } Spacer() - Button(action: { - openURL(URL(string: "https://github.com/NinjaCheetah/RIT-Dining")!) - }) { - Label("GitHub Repository", systemImage: "globe") - } - Button(action: { - openURL(URL(string: "https://tigercenter.rit.edu/")!) - }) { - Label("TigerCenter", systemImage: "globe") - } - Button(action: { - openURL(URL(string: "https://maps.rit.edu/")!) - }) { - Label("RIT Maps", systemImage: "globe") - } } .padding() .navigationTitle("About") diff --git a/RIT Dining/Views/DetailView.swift b/RIT Dining/Views/DetailView.swift index e9d2610..e96eff5 100644 --- a/RIT Dining/Views/DetailView.swift +++ b/RIT Dining/Views/DetailView.swift @@ -12,6 +12,7 @@ struct DetailView: View { @State var locationId: Int @Environment(Favorites.self) var favorites @Environment(DiningModel.self) var model + @Environment(\.openURL) private var openURL @State private var showingSafari: Bool = false @State private var openString: String = "" @State private var occupancyLoading: Bool = true @@ -100,11 +101,19 @@ struct DetailView: View { .font(.title3) } } + // Open OnDemand. Unfortunately the locations use arbitrary IDs, so just open the main OnDemand page. + Button(action: { + openURL(URL(string: "https://ondemand.rit.edu")!) + }) { + Image(systemName: "cart") + + .font(.title3) + } + .disabled(location.open == .closed || location.open == .openingSoon) Button(action: { showingSafari = true }) { Image(systemName: "map") - .foregroundStyle(.accent) .font(.title3) } }