Adds terms link in the subscription and account creation view

compil
Laurent 1 year ago
parent c2fd9f1c8d
commit e430eefb91
  1. 4
      PadelClub/Utils/URLs.swift
  2. 8
      PadelClub/Views/Tournament/Subscription/SubscriptionView.swift
  3. 8
      PadelClub/Views/User/UserCreationView.swift

@ -37,6 +37,10 @@ enum URLs: String, Identifiable {
return URL(string: self.rawValue)!
}
static func sitePage(component: String) -> String {
return "\(URLs.main.rawValue)\(component)"
}
}
enum PageLink: String, Identifiable, CaseIterable {

@ -187,6 +187,14 @@ struct SubscriptionView: View {
self._restore()
}.isLoading(self.isRestoring)
}
ToolbarItem(placement: .bottomBar) {
Button("Conditions d'utilisation") {
if let url = URL(string: URLs.sitePage(component: "terms-of-use/")) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
}
}
}
// .toolbar {

@ -142,8 +142,14 @@ struct UserCreationFormView: View {
}
Section {
Button("Conditions d'utilisation") {
if let url = URL(string: URLs.sitePage(component: "terms-of-use/")) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
}
Toggle(isOn: self.$dataCollectAuthorized) {
Text("J'autorise XLR Sport, éditeur de Padel Club, à sauvegarder les données ci-dessus. XLR Sport s'engage à ne pas partager ces données.").font(.footnote)
Text("J'accepte les conditions d'utilisations du service Padel Club proposé par XLR Sport").font(.footnote)
}
}

Loading…
Cancel
Save