support email button

multistore
Razmig Sarkissian 1 year ago
parent 9d1e3e7bbc
commit e4dd5077bf
  1. 4
      PadelClub.xcodeproj/project.pbxproj
  2. 5
      PadelClub/PadelClubApp.swift
  3. 2
      PadelClub/Views/Calling/CallView.swift
  4. 5
      PadelClub/Views/GroupStage/GroupStagesView.swift
  5. 4
      PadelClub/Views/Navigation/Agenda/ActivityView.swift
  6. 5
      PadelClub/Views/Navigation/Toolbox/ToolboxView.swift

@ -1897,7 +1897,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 57;
CURRENT_PROJECT_VERSION = 58;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\"";
@ -1937,7 +1937,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 57;
CURRENT_PROJECT_VERSION = 58;
DEFINES_MODULE = YES;
DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\"";
DEVELOPMENT_TEAM = BQ3Y44M3Q6;

@ -53,6 +53,11 @@ struct PadelClubApp: App {
UserDefaults.standard.set(false, forKey: "_UIConstraintBasedLayoutLogUnsatisfiable")
}
static func openMail(emailTo: String = "support@padelclub.app", subject: String = "Support Padel Club") {
if let url = URL(string: "mailto:\(emailTo)?subject=\(subject)"), UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
}
}
class AppDelegate: NSObject, UIApplicationDelegate {

@ -186,7 +186,7 @@ struct CallView: View {
.underline()
}
} else {
Button(byMessage ? "sms" : "mail") {
FooterButtonView(byMessage ? "sms" : "mail") {
_summon(byMessage: byMessage, reSummon: false)
}
}

@ -107,11 +107,6 @@ struct GroupStagesView: View {
availableToStart = await tournament.availableToStart(allMatches, in: runningMatches ?? [])
readyMatches = await tournament.readyMatches(allMatches)
}
.overlay {
if availableToStart?.isEmpty == true && runningMatches?.isEmpty == true && readyMatches?.isEmpty == true && finishedMatches.isEmpty == true {
ContentUnavailableView("Aucun match à afficher", systemImage: "tennisball")
}
}
.navigationTitle("Toutes les poules")
case .groupStage(let groupStage):
GroupStageView(groupStage: groupStage).id(groupStage.id)

@ -327,7 +327,9 @@ struct ActivityView: View {
}
}
SupportButtonView()
FooterButtonView("Besoin d'aide ? Un problème ? Contactez-nous !") {
PadelClubApp.openMail()
}
}
}

@ -19,8 +19,9 @@ struct ToolboxView: View {
Section {
Text("Version de l'application").badge(PadelClubApp.appVersion)
} footer: {
SupportButtonView()
Button("Contactez-nous") {
PadelClubApp.openMail()
}
}
#if DEBUG

Loading…
Cancel
Save