diff --git a/PadelClub.xcodeproj/project.pbxproj b/PadelClub.xcodeproj/project.pbxproj index 5a66597..d761ec0 100644 --- a/PadelClub.xcodeproj/project.pbxproj +++ b/PadelClub.xcodeproj/project.pbxproj @@ -3624,7 +3624,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\""; @@ -3650,7 +3650,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.20; + MARKETING_VERSION = 1.1.22; PRODUCT_BUNDLE_IDENTIFIER = app.padelclub; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; @@ -3670,7 +3670,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; @@ -3695,7 +3695,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - MARKETING_VERSION = 1.1.20; + 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/PlayerRegistration.swift b/PadelClub/Data/PlayerRegistration.swift index c48b8ba..44ef214 100644 --- a/PadelClub/Data/PlayerRegistration.swift +++ b/PadelClub/Data/PlayerRegistration.swift @@ -18,7 +18,11 @@ final class PlayerRegistration: BasePlayerRegistration, SideStorable { 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" + } } } diff --git a/PadelClub/Data/TeamRegistration.swift b/PadelClub/Data/TeamRegistration.swift index 45c36a7..10cc7bb 100644 --- a/PadelClub/Data/TeamRegistration.swift +++ b/PadelClub/Data/TeamRegistration.swift @@ -701,7 +701,17 @@ final class TeamRegistration: BaseTeamRegistration, SideStorable { } 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/Data/Tournament.swift b/PadelClub/Data/Tournament.swift index f2c3350..ed51d3f 100644 --- a/PadelClub/Data/Tournament.swift +++ b/PadelClub/Data/Tournament.swift @@ -697,7 +697,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) @@ -706,7 +706,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/Navigation/Agenda/EventListView.swift b/PadelClub/Views/Navigation/Agenda/EventListView.swift index 6998a05..01e0376 100644 --- a/PadelClub/Views/Navigation/Agenda/EventListView.swift +++ b/PadelClub/Views/Navigation/Agenda/EventListView.swift @@ -261,6 +261,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() diff --git a/PadelClub/Views/Tournament/FileImportView.swift b/PadelClub/Views/Tournament/FileImportView.swift index 0973ba2..e25ff4d 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/Screen/InscriptionManagerView.swift b/PadelClub/Views/Tournament/Screen/InscriptionManagerView.swift index effe804..4b1671e 100644 --- a/PadelClub/Views/Tournament/Screen/InscriptionManagerView.swift +++ b/PadelClub/Views/Tournament/Screen/InscriptionManagerView.swift @@ -615,7 +615,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/Tournament/Shared/TournamentCellView.swift b/PadelClub/Views/Tournament/Shared/TournamentCellView.swift index 9919ed6..3b6f6d7 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? { 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 {