Add link to privacy policy and school website in settings

This commit is contained in:
2020-12-23 19:07:31 +01:00
parent 8e1645a3ca
commit ea4171a75f
2 changed files with 20 additions and 0 deletions

View File

@@ -36,7 +36,22 @@ struct SettingsView: View {
}
}
Section(header: Text("SCHOOL")) {
Button(action: {
let schoolID = UserDefaults.standard.integer(forKey: "school")
let server = serverCompanion.getServer(serverID: Int32(schoolID))
URLUtils.openUrl(url: serverCompanion.getServerWebsite(server: server))
}) {
Text("School website")
}
}
Section(header: Text("ABOUT")) {
Button(action: {
URLUtils.openUrl(url: "https://www.iubenda.com/privacy-policy/13230834")
}) {
Text("Privacy policy")
}
HStack {
Text("Version name")
Spacer()