mirror of
https://github.com/NinjaCheetah/RIT-Dining.git
synced 2025-12-02 01:21:35 -05:00
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:
parent
dec8788276
commit
2c512180d9
@ -265,7 +265,7 @@
|
|||||||
CODE_SIGN_ENTITLEMENTS = "RIT Dining/RIT Dining.entitlements";
|
CODE_SIGN_ENTITLEMENTS = "RIT Dining/RIT Dining.entitlements";
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 15;
|
CURRENT_PROJECT_VERSION = 16;
|
||||||
DEVELOPMENT_TEAM = 5GF7GKNTK4;
|
DEVELOPMENT_TEAM = 5GF7GKNTK4;
|
||||||
ENABLE_PREVIEWS = YES;
|
ENABLE_PREVIEWS = YES;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
@ -300,7 +300,7 @@
|
|||||||
CODE_SIGN_ENTITLEMENTS = "RIT Dining/RIT Dining.entitlements";
|
CODE_SIGN_ENTITLEMENTS = "RIT Dining/RIT Dining.entitlements";
|
||||||
CODE_SIGN_IDENTITY = "Apple Development";
|
CODE_SIGN_IDENTITY = "Apple Development";
|
||||||
CODE_SIGN_STYLE = Automatic;
|
CODE_SIGN_STYLE = Automatic;
|
||||||
CURRENT_PROJECT_VERSION = 15;
|
CURRENT_PROJECT_VERSION = 16;
|
||||||
DEVELOPMENT_TEAM = 5GF7GKNTK4;
|
DEVELOPMENT_TEAM = 5GF7GKNTK4;
|
||||||
ENABLE_PREVIEWS = YES;
|
ENABLE_PREVIEWS = YES;
|
||||||
GENERATE_INFOPLIST_FILE = YES;
|
GENERATE_INFOPLIST_FILE = YES;
|
||||||
|
|||||||
@ -13,34 +13,41 @@ struct AboutView: View {
|
|||||||
let buildNumber: String = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as! String
|
let buildNumber: String = Bundle.main.object(forInfoDictionaryKey: "CFBundleVersion") as! String
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack {
|
VStack(alignment: .leading) {
|
||||||
Image("Icon")
|
Image("Icon")
|
||||||
.resizable()
|
.resizable()
|
||||||
.frame(width: 128, height: 128)
|
.frame(width: 128, height: 128)
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 20))
|
.clipShape(RoundedRectangle(cornerRadius: 20))
|
||||||
Text("RIT Dining App")
|
Text("An RIT Dining App")
|
||||||
.font(.title)
|
.font(.title)
|
||||||
Text("because the RIT dining website is slow!")
|
|
||||||
Text("Version \(appVersionString) (\(buildNumber))")
|
Text("Version \(appVersionString) (\(buildNumber))")
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
Text("The RIT Dining app is powered by the TigerCenter API. Dining location occupancy information is sourced from the RIT maps API.")
|
VStack(alignment: .leading, spacing: 10) {
|
||||||
.multilineTextAlignment(.center)
|
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()
|
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()
|
.padding()
|
||||||
.navigationTitle("About")
|
.navigationTitle("About")
|
||||||
|
|||||||
@ -12,6 +12,7 @@ struct DetailView: View {
|
|||||||
@State var locationId: Int
|
@State var locationId: Int
|
||||||
@Environment(Favorites.self) var favorites
|
@Environment(Favorites.self) var favorites
|
||||||
@Environment(DiningModel.self) var model
|
@Environment(DiningModel.self) var model
|
||||||
|
@Environment(\.openURL) private var openURL
|
||||||
@State private var showingSafari: Bool = false
|
@State private var showingSafari: Bool = false
|
||||||
@State private var openString: String = ""
|
@State private var openString: String = ""
|
||||||
@State private var occupancyLoading: Bool = true
|
@State private var occupancyLoading: Bool = true
|
||||||
@ -100,11 +101,19 @@ struct DetailView: View {
|
|||||||
.font(.title3)
|
.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: {
|
Button(action: {
|
||||||
showingSafari = true
|
showingSafari = true
|
||||||
}) {
|
}) {
|
||||||
Image(systemName: "map")
|
Image(systemName: "map")
|
||||||
.foregroundStyle(.accent)
|
|
||||||
.font(.title3)
|
.font(.title3)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user