Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Commit

Permalink
. (#479)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippzagar authored Sep 2, 2022
1 parent ebaf9b3 commit 4ea3a6f
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion Campus-iOS/LoginComponent/Views/TokenConfirmationView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ struct TokenConfirmationView: View {

Spacer()

let mailToString = "mailto:app@tum.de?subject=[IOS - Token]&body=Hello I have an issue activating the token...".addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)
let mailToString = "mailto:app@tum.de?subject=[IOS - Token]&body=Hello, I have an issue activating the token pf Campus Online in the TCA version \(Bundle.main.appVersionShort) on \(ProcessInfo().operatingSystemVersion.fullVersion). Please describe the problem in more detail.".addingPercentEncoding(withAllowedCharacters: .urlQueryAllowed)
let mailToUrl = URL(string: mailToString!)!
Link(destination: mailToUrl) {
Text("Contact Support").foregroundColor(Color(.tumBlue))
Expand Down Expand Up @@ -260,3 +260,19 @@ class PlayerUIView: UIView {
}

}

extension OperatingSystemVersion {
var fullVersion: String {
"\(majorVersion).\(minorVersion).\(patchVersion)"
}
}

extension Bundle {
var appVersionShort: String {
if let result = infoDictionary?["CFBundleShortVersionString"] as? String {
return result
} else {
return "⚠️"
}
}
}

0 comments on commit 4ea3a6f

Please sign in to comment.