Merge branch 'main' into sync2

sync2
Laurent 8 months ago
commit ef387783c1
  1. 8
      PadelClub.xcodeproj/project.pbxproj
  2. 33
      PadelClub/Assets.xcassets/beigeNotUniversal.colorset/Contents.json
  3. 33
      PadelClub/Assets.xcassets/grayNotUniversal.colorset/Contents.json
  4. 6
      PadelClub/Data/PlayerRegistration.swift
  5. 12
      PadelClub/Data/TeamRegistration.swift
  6. 4
      PadelClub/Data/Tournament.swift
  7. 4
      PadelClub/InscriptionLegendView.swift
  8. 7
      PadelClub/Views/Navigation/Agenda/EventListView.swift
  9. 9
      PadelClub/Views/Tournament/FileImportView.swift
  10. 2
      PadelClub/Views/Tournament/Screen/InscriptionManagerView.swift
  11. 1
      PadelClub/Views/Tournament/Shared/TournamentCellView.swift
  12. 2
      PadelClub/Views/ViewModifiers/ListRowViewModifier.swift

@ -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 = "";

@ -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
}
}

@ -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
}
}

@ -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"
}
}
}

@ -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
}

@ -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
}
}

@ -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.")
}

@ -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<TeamRegistration>, store.id == tournament.id {
tournament.lastTeamRefresh = Date()
}
})
.id(tournament.lastTeamRefresh)
.task(priority: .background) {
await tournament.refreshTeamList()

@ -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

@ -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)

@ -40,6 +40,7 @@ struct TournamentCellView: View {
_buildView(build, existingTournament: event?.existingBuild(build))
}
}
.id(shouldTournamentBeOver)
}
var teamCount: Int? {

@ -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 {

Loading…
Cancel
Save