RIT-Dining/RIT Dining/Views/AboutView.swift
NinjaCheetah 2c512180d9
Added OnDemand link and improved about screen
- All open dining locations now have a small shopping cart button in the top right that opens up OnDemand
- The about screen is organized much better and has a clear disclaimer about this not being an RIT-affiliated project
2025-11-02 17:00:39 -05:00

61 lines
2.3 KiB
Swift

//
// AboutView.swift
// RIT Dining
//
// Created by Campbell on 9/12/25.
//
import SwiftUI
struct AboutView: View {
@Environment(\.openURL) private var openURL
let appVersionString: String = Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as! String
let buildNumber: String = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as! String
var body: some View {
VStack(alignment: .leading) {
Image("Icon")
.resizable()
.frame(width: 128, height: 128)
.clipShape(RoundedRectangle(cornerRadius: 20))
Text("An RIT Dining App")
.font(.title)
Text("Version \(appVersionString) (\(buildNumber))")
.foregroundStyle(.secondary)
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()
}
.padding()
.navigationTitle("About")
.navigationBarTitleDisplayMode(.inline)
}
}
#Preview {
AboutView()
}