'Keep Screen Awake'-Setting, Acknowledge used libraries

This commit is contained in:
VincentMeilinger
2024-01-11 10:12:59 +01:00
parent eb3f11cd17
commit 772ee6b0e0
5 changed files with 170 additions and 0 deletions

View File

@@ -48,6 +48,12 @@ struct SettingsView: View {
Text("Configure which sections in your recipes are expanded by default.")
}
Section {
Toggle(isOn: $userSettings.keepScreenAwake) {
Text("Keep screen awake when viewing recipes")
}
}
Section {
Toggle(isOn: $userSettings.storeRecipes) {
Text("Offline recipes")
@@ -112,6 +118,23 @@ struct SettingsView: View {
} footer: {
Text("Deleting local data will not affect the recipe data stored on your server.")
}
Section(header: Text("Acknowledgements")) {
VStack(alignment: .leading) {
if let url = URL(string: "https://github.com/scinfu/SwiftSoup") {
Link("SwiftSoup", destination: url)
.font(.headline)
Text("An HTML parsing and web scraping library for Swift. Used for importing schema.org recipes from websites.")
}
}
VStack(alignment: .leading) {
if let url = URL(string: "https://github.com/techprimate/TPPDF") {
Link("TPPDF", destination: url)
.font(.headline)
Text("A simple-to-use PDF builder for Swift. Used for generating recipe PDF documents.")
}
}
}
}
.navigationTitle("Settings")
.alert(alertType.getTitle(), isPresented: $showAlert) {