multistore
Razmig Sarkissian 1 year ago
parent 538c20b751
commit f0919515bf
  1. 4
      PadelClub.xcodeproj/project.pbxproj
  2. 2
      PadelClub/Utils/Network/NetworkManager.swift
  3. 2
      PadelClub/Views/Navigation/MainView.swift
  4. 2
      PadelClub/Views/Navigation/Umpire/PadelClubView.swift
  5. 6
      PadelClub/Views/Navigation/Umpire/UmpireView.swift
  6. 2
      PadelClub/Views/Shared/SupportButtonView.swift
  7. 10
      PadelClub/Views/Subscription/Guard.swift

@ -1901,7 +1901,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 59;
CURRENT_PROJECT_VERSION = 60;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEFINES_MODULE = YES;
DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\"";
@ -1941,7 +1941,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 59;
CURRENT_PROJECT_VERSION = 60;
DEFINES_MODULE = YES;
DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\"";
DEVELOPMENT_TEAM = BQ3Y44M3Q6;

@ -24,7 +24,7 @@ class NetworkManager {
let documentsUrl: URL = SourceFileManager.shared.rankingSourceDirectory
let destinationFileUrl = documentsUrl.appendingPathComponent("\(dateString)")
let fileURL = URL(string: "https://padelclub.app/static/\(dateString)")
let fileURL = URL(string: "https://xlr.alwaysdata.net/static/rankings/\(dateString)")
if FileManager.default.fileExists(atPath: destinationFileUrl.path()) {
return

@ -54,7 +54,7 @@ struct MainView: View {
}
var badgeText: Text? {
return _isConnected() == false ? Text("!").font(.headline) : nil
return (Store.main.userName() != nil && _isConnected() == false) ? Text("!").font(.headline) : nil
}
var body: some View {

@ -107,11 +107,13 @@ struct PadelClubView: View {
} description: {
Text("Padel Club peut importer toutes les données publiques de la FFT concernant tous les compétiteurs et compétitrices.")
} actions: {
if lastDataSource != nil {
RowButtonView("Démarrer l'importation") {
_startImporting()
}
}
}
}
let monthData = dataStore.monthData.sorted(by: \.creationDate).reversed()
ForEach(monthData) { monthData in

@ -228,11 +228,11 @@ struct AccountRowView: View {
if Store.main.hasToken() {
Text(self.userName)
} else {
Image(systemName: "xmark.circle.fill")
.foregroundStyle(.logoRed)
Image(systemName: "exclamationmark.circle.fill")
.foregroundStyle(.master)
}
} label: {
Label("Mon compte", systemImage: "person.fill")
Label(Store.main.userName() == nil ? "Créer votre compte Padel Club" : "Mon compte", systemImage: "person.fill")
if dataStore.user.email.isEmpty == false {
Text(dataStore.user.email)
}

@ -80,7 +80,7 @@ struct SupportButtonView: View {
private func _getBody() -> String {
let separator = "---------------------------------------------"
return ["token", Store.main.token(), separator, "userId", Store.main.userId, separator, "dataStore userId", DataStore.shared.user.id].compacted().joined(separator: "\n\n")
return ["Décrivez votre problème", "\n\n\n", separator, "token", Store.main.token(), separator, "userId", Store.main.userId, separator, "dataStore userId", DataStore.shared.user.id].compacted().joined(separator: "\n")
}
private func _getDeviceIdentifier() -> String {

@ -140,14 +140,14 @@ import LeStorage
}
var currentPlan: StoreItem? {
return .monthlyUnlimited
// return .monthlyUnlimited
// #if DEBUG
// return .monthlyUnlimited
// #else
// if let currentBestPlan = self.currentBestPlan, let plan = StoreItem(rawValue: currentBestPlan.productID) {
// return plan
// }
// return nil
if let currentBestPlan = self.currentBestPlan, let plan = StoreItem(rawValue: currentBestPlan.productID) {
return plan
}
return nil
// #endif
}

Loading…
Cancel
Save