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
This commit is contained in:
Campbell 2025-11-02 17:00:39 -05:00
parent dec8788276
commit 2c512180d9
Signed by: NinjaCheetah
GPG Key ID: 39C2500E1778B156
3 changed files with 39 additions and 23 deletions

View File

@ -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;

View File

@ -13,35 +13,42 @@ 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)
Spacer()
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")!)
}) {
Label("GitHub Repository", systemImage: "globe")
Text("Source Code")
}
Text("")
.foregroundStyle(.secondary)
Button(action: {
openURL(URL(string: "https://tigercenter.rit.edu/")!)
}) {
Label("TigerCenter", systemImage: "globe")
Text("TigerCenter")
}
Text("")
.foregroundStyle(.secondary)
Button(action: {
openURL(URL(string: "https://maps.rit.edu/")!)
}) {
Label("RIT Maps", systemImage: "globe")
Text("Official RIT Map")
}
}
}
Spacer()
}
.padding()
.navigationTitle("About")
.navigationBarTitleDisplayMode(.inline)

View File

@ -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)
}
}