From 5da65dbe35c3f1c02611471c4658ac446f9ce7a9 Mon Sep 17 00:00:00 2001 From: Raz Date: Sat, 8 Mar 2025 08:54:34 +0100 Subject: [PATCH 1/4] v1.1.21 --- PadelClub.xcodeproj/project.pbxproj | 8 ++++---- PadelClub/Data/PlayerRegistration.swift | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/PadelClub.xcodeproj/project.pbxproj b/PadelClub.xcodeproj/project.pbxproj index f360c27..6e5b8df 100644 --- a/PadelClub.xcodeproj/project.pbxproj +++ b/PadelClub.xcodeproj/project.pbxproj @@ -3318,7 +3318,7 @@ CODE_SIGN_ENTITLEMENTS = PadelClub/PadelClub.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\""; @@ -3344,7 +3344,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.20; + MARKETING_VERSION = 1.1.21; PRODUCT_BUNDLE_IDENTIFIER = app.padelclub; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3364,7 +3364,7 @@ CODE_SIGN_ENTITLEMENTS = PadelClub/PadelClub.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 2; + CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DEVELOPMENT_ASSET_PATHS = "\"PadelClub/Preview Content\""; DEVELOPMENT_TEAM = BQ3Y44M3Q6; @@ -3389,7 +3389,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.20; + MARKETING_VERSION = 1.1.21; PRODUCT_BUNDLE_IDENTIFIER = app.padelclub; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/PadelClub/Data/PlayerRegistration.swift b/PadelClub/Data/PlayerRegistration.swift index 714d71e..31358c8 100644 --- a/PadelClub/Data/PlayerRegistration.swift +++ b/PadelClub/Data/PlayerRegistration.swift @@ -49,7 +49,11 @@ final class PlayerRegistration: ModelObject, Storable { case .beachPadel: return "beach-padel" case nil: - return "créé par vous-même" + if registeredOnline { + return "à vérifier vous-même" + } else { + return "créé par vous-même" + } } } From 8704288bf14be1a3567a2a1488e7ad563c630923 Mon Sep 17 00:00:00 2001 From: Raz Date: Mon, 10 Mar 2025 15:39:45 +0100 Subject: [PATCH 2/4] fix init team reg --- PadelClub/Data/TeamRegistration.swift | 12 +++++++++++- .../Views/Navigation/Agenda/EventListView.swift | 7 +++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/PadelClub/Data/TeamRegistration.swift b/PadelClub/Data/TeamRegistration.swift index c6d9d80..72de9bc 100644 --- a/PadelClub/Data/TeamRegistration.swift +++ b/PadelClub/Data/TeamRegistration.swift @@ -648,7 +648,17 @@ final class TeamRegistration: ModelObject, Storable { } func bracketMatchTitleAndQualifiedStatus() -> String? { - let values = [qualified ? "Qualifié" : nil, initialMatch()?.roundAndMatchTitle()].compactMap({ $0 }) + let v = groupStageObject()?.groupStageTitle() + var base = "Qualifié" + if qualified { + if let groupStageTitle = groupStageObject()?.groupStageTitle() { + base = base + " (\(groupStageTitle))" + } + } + + let suffix = qualified ? nil : groupStageObject()?.groupStageTitle() + let initalMatchTitle = initialMatch()?.roundAndMatchTitle() ?? suffix + let values = [qualified ? base : nil, initalMatchTitle].compactMap({ $0 }) if values.isEmpty { return nil } diff --git a/PadelClub/Views/Navigation/Agenda/EventListView.swift b/PadelClub/Views/Navigation/Agenda/EventListView.swift index 1218d7d..f9c0ed5 100644 --- a/PadelClub/Views/Navigation/Agenda/EventListView.swift +++ b/PadelClub/Views/Navigation/Agenda/EventListView.swift @@ -259,6 +259,13 @@ struct EventListView: View { private func _tournamentView(_ tournament: Tournament) -> some View { NavigationLink(value: tournament) { TournamentCellView(tournament: tournament) + .onReceive(NotificationCenter.default.publisher(for: NSNotification.Name.CollectionDidLoad), perform: { notification in + + if let store = notification.object as? StoredCollection, store.id == tournament.id { + tournament.lastTeamRefresh = Date() + } + + }) .id(tournament.lastTeamRefresh) .task(priority: .background) { await tournament.refreshTeamList() From 35671d44eedb496fce4d9fa2475a3b10cf63ccc9 Mon Sep 17 00:00:00 2001 From: Raz Date: Mon, 10 Mar 2025 15:57:01 +0100 Subject: [PATCH 3/4] remove unnecessary tip --- PadelClub/Views/Tournament/FileImportView.swift | 9 --------- .../Views/Tournament/Shared/TournamentCellView.swift | 1 + 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/PadelClub/Views/Tournament/FileImportView.swift b/PadelClub/Views/Tournament/FileImportView.swift index caf0004..2a3549f 100644 --- a/PadelClub/Views/Tournament/FileImportView.swift +++ b/PadelClub/Views/Tournament/FileImportView.swift @@ -66,8 +66,6 @@ struct FileImportView: View { @Environment(Tournament.self) var tournament: Tournament @Environment(\.dismiss) private var dismiss - - let notFoundAreWalkOutTip = NotFoundAreWalkOutTip() @State private var fileContent: String? @State private var teams: [FileImportManager.TeamHolder] = [] @@ -322,13 +320,6 @@ struct FileImportView: View { } else if didImport { let _filteredTeams = filteredTeams let previousTeams = tournament.sortedTeams(selectedSortedTeams: tournament.selectedSortedTeams()) - - if previousTeams.isEmpty == false { - Section { - TipView(notFoundAreWalkOutTip) - .tipStyle(tint: nil) - } - } if multiImport, fileProvider == .frenchFederation, let tournaments = tournament.eventObject()?.tournaments, tournaments.count > 1 { ForEach(tournaments) { tournament in diff --git a/PadelClub/Views/Tournament/Shared/TournamentCellView.swift b/PadelClub/Views/Tournament/Shared/TournamentCellView.swift index 2c9d62d..67924a9 100644 --- a/PadelClub/Views/Tournament/Shared/TournamentCellView.swift +++ b/PadelClub/Views/Tournament/Shared/TournamentCellView.swift @@ -40,6 +40,7 @@ struct TournamentCellView: View { _buildView(build, existingTournament: event?.existingBuild(build)) } } + .id(shouldTournamentBeOver) } var teamCount: Int? { From 6dccef8908f9ae96d4ffcaddab45d8b4915ca97d Mon Sep 17 00:00:00 2001 From: Razmig Sarkissian Date: Wed, 12 Mar 2025 17:33:44 +0100 Subject: [PATCH 4/4] v1.1.22 --- PadelClub.xcodeproj/project.pbxproj | 4 +-- .../beigeNotUniversal.colorset/Contents.json | 33 +++++++++++++++++++ .../grayNotUniversal.colorset/Contents.json | 33 +++++++++++++++++++ PadelClub/Data/Tournament.swift | 4 +-- PadelClub/InscriptionLegendView.swift | 4 +-- .../Screen/InscriptionManagerView.swift | 2 +- .../ViewModifiers/ListRowViewModifier.swift | 2 +- 7 files changed, 74 insertions(+), 8 deletions(-) create mode 100644 PadelClub/Assets.xcassets/beigeNotUniversal.colorset/Contents.json create mode 100644 PadelClub/Assets.xcassets/grayNotUniversal.colorset/Contents.json diff --git a/PadelClub.xcodeproj/project.pbxproj b/PadelClub.xcodeproj/project.pbxproj index 6e5b8df..5aacc2a 100644 --- a/PadelClub.xcodeproj/project.pbxproj +++ b/PadelClub.xcodeproj/project.pbxproj @@ -3344,7 +3344,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.21; + MARKETING_VERSION = 1.1.22; PRODUCT_BUNDLE_IDENTIFIER = app.padelclub; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3389,7 +3389,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.21; + MARKETING_VERSION = 1.1.22; PRODUCT_BUNDLE_IDENTIFIER = app.padelclub; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; diff --git a/PadelClub/Assets.xcassets/beigeNotUniversal.colorset/Contents.json b/PadelClub/Assets.xcassets/beigeNotUniversal.colorset/Contents.json new file mode 100644 index 0000000..7a8471e --- /dev/null +++ b/PadelClub/Assets.xcassets/beigeNotUniversal.colorset/Contents.json @@ -0,0 +1,33 @@ +{ + "colors" : [ + { + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0.808", + "green" : "0.906", + "red" : "0.980" + } + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "platform" : "ios", + "reference" : "systemGrayColor" + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/PadelClub/Assets.xcassets/grayNotUniversal.colorset/Contents.json b/PadelClub/Assets.xcassets/grayNotUniversal.colorset/Contents.json new file mode 100644 index 0000000..a93813b --- /dev/null +++ b/PadelClub/Assets.xcassets/grayNotUniversal.colorset/Contents.json @@ -0,0 +1,33 @@ +{ + "colors" : [ + { + "color" : { + "platform" : "ios", + "reference" : "systemGrayColor" + }, + "idiom" : "universal" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "color" : { + "color-space" : "srgb", + "components" : { + "alpha" : "1.000", + "blue" : "0x00", + "green" : "0xD2", + "red" : "0xFF" + } + }, + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/PadelClub/Data/Tournament.swift b/PadelClub/Data/Tournament.swift index 57c449f..13aa6ab 100644 --- a/PadelClub/Data/Tournament.swift +++ b/PadelClub/Data/Tournament.swift @@ -1002,7 +1002,7 @@ defer { } func cutLabelColor(index: Int?, teamCount: Int?) -> Color { - guard let index else { return Color.gray } + guard let index else { return Color.grayNotUniversal } let _teamCount = teamCount ?? selectedSortedTeams().count let groupStageCut = groupStageCut() let bracketCut = bracketCut(teamCount: _teamCount, groupStageCut: groupStageCut) @@ -1011,7 +1011,7 @@ defer { } else if index - bracketCut < groupStageCut && _teamCount > 0 { return Color.indigo } else { - return Color.gray + return Color.grayNotUniversal } } diff --git a/PadelClub/InscriptionLegendView.swift b/PadelClub/InscriptionLegendView.swift index 9589fc6..8bc6fbd 100644 --- a/PadelClub/InscriptionLegendView.swift +++ b/PadelClub/InscriptionLegendView.swift @@ -42,7 +42,7 @@ struct InscriptionLegendView: View { Section { Text("Équipe en liste d'attente") - .listRowView(isActive: true, color: .gray, hideColorVariation: true, alignment: .leading) + .listRowView(isActive: true, color: .grayNotUniversal, hideColorVariation: true, alignment: .leading) Text("Équipe forfaite") .listRowView(isActive: true, color: .logoRed, hideColorVariation: true, alignment: .leading) } @@ -56,7 +56,7 @@ struct InscriptionLegendView: View { Section { Text("Équipe ayant un joueur ne provenant pas du fichier beach-padel") - .listRowView(isActive: true, color: .beige, hideColorVariation: true, backgroundColor: .beige, alignment: .leading) + .listRowView(isActive: true, color: .beigeNotUniversal, hideColorVariation: true, backgroundColor: .beigeNotUniversal, alignment: .leading) } footer: { Text("Une fois que vous avez importé votre fichier, Padel Club vous affiche ainsi les équipes ayant des joueurs ne provenant pas du fichier.") } diff --git a/PadelClub/Views/Tournament/Screen/InscriptionManagerView.swift b/PadelClub/Views/Tournament/Screen/InscriptionManagerView.swift index 12d9a63..d12fc78 100644 --- a/PadelClub/Views/Tournament/Screen/InscriptionManagerView.swift +++ b/PadelClub/Views/Tournament/Screen/InscriptionManagerView.swift @@ -616,7 +616,7 @@ struct InscriptionManagerView: View { Section { ForEach(teams) { team in let teamIndex = team.index(in: sortedTeams) - let color: Color? = isImported ? (team.unrankedOrUnknown() ? .logoRed : (team.isImported() == false ? .beige : nil)) : nil + let color: Color? = isImported ? (team.unrankedOrUnknown() ? .logoRed : (team.isImported() == false ? .beigeNotUniversal : nil)) : nil NavigationLink { EditingTeamView(team: team) diff --git a/PadelClub/Views/ViewModifiers/ListRowViewModifier.swift b/PadelClub/Views/ViewModifiers/ListRowViewModifier.swift index 02dcbc2..a7aa78c 100644 --- a/PadelClub/Views/ViewModifiers/ListRowViewModifier.swift +++ b/PadelClub/Views/ViewModifiers/ListRowViewModifier.swift @@ -15,7 +15,7 @@ struct ListRowViewModifier: ViewModifier { let alignment: Alignment func colorVariation() -> Color { - hideColorVariation ? (backgroundColor ?? Color(uiColor: .systemBackground)) : color.variation() + hideColorVariation ? (backgroundColor ?? Color(uiColor: .secondarySystemGroupedBackground)) : color.variation() } func body(content: Content) -> some View {