fix main menu

sync3
Razmig Sarkissian 1 month ago
parent b2bc59c19e
commit 15e480cf28
  1. 64
      PadelClub/Views/Tournament/TournamentView.swift

@ -238,37 +238,17 @@ struct TournamentView: View {
} }
Divider() Divider()
} }
Menu {
Button {
navigation.path.append(Screen.event)
} label: {
Text("Événement")
if let tournamentCount = tournament.eventObject()?.confirmedTournaments().count {
Text(tournamentCount.formatted() + " tournoi" + tournamentCount.pluralSuffix)
.foregroundStyle(.secondary)
}
}
Button {
navigation.path.append(Screen.settings)
} label: {
Text("Tournoi")
Text("Inscription en ligne, pistes, formats")
.foregroundStyle(.secondary)
}
Button {
navigation.path.append(Screen.structure)
} label: {
LabelStructure()
Text("Poules, tableau, qualifiés sortants")
.foregroundStyle(.secondary)
}
} label: {
Label("Réglages", systemImage: "wrench.and.screwdriver")
Text("Événement, tournoi, structure")
NavigationLink(value: Screen.event) {
Label("Événement", systemImage: "info")
}
NavigationLink(value: Screen.settings) {
Label("Tournoi", systemImage: "gearshape")
}
NavigationLink(value: Screen.structure) {
Label("Structure", systemImage: "flowchart")
} }
NavigationLink(value: Screen.call) { NavigationLink(value: Screen.call) {
@ -281,9 +261,9 @@ struct TournamentView: View {
TournamentDeadlinesView(tournament: tournament) TournamentDeadlinesView(tournament: tournament)
} }
.toolbarBackground(.visible, for: .navigationBar) .toolbarBackground(.visible, for: .navigationBar)
.navigationTitle("Rappel des délais") .navigationTitle("Rappel des échéances")
} label: { } label: {
Label("Rappel des délais", systemImage: "calendar.badge.exclamationmark") Label("Échéances", systemImage: "checklist")
} }
} }
@ -291,10 +271,10 @@ struct TournamentView: View {
Label(tournament.isFree() ? "Présence" : "Encaissement", systemImage: tournament.isFree() ? "person.crop.circle.badge.checkmark" : "eurosign.circle") Label(tournament.isFree() ? "Présence" : "Encaissement", systemImage: tournament.isFree() ? "person.crop.circle.badge.checkmark" : "eurosign.circle")
} }
NavigationLink(value: Screen.statistics) { // NavigationLink(value: Screen.statistics) {
Label("Statistiques", systemImage: "123.rectangle") // Label("Statistiques", systemImage: "123.rectangle")
} // }
//
NavigationLink(value: Screen.rankings) { NavigationLink(value: Screen.rankings) {
LabeledContent { LabeledContent {
@ -306,10 +286,7 @@ struct TournamentView: View {
.foregroundStyle(.green) .foregroundStyle(.green)
} }
} label: { } label: {
Text("Classement final") Label("Classement", systemImage: "trophy")
if tournament.publishRankings == false {
Text("Vérifiez le classement avant de publier").foregroundStyle(.logoRed)
}
} }
} }
@ -330,11 +307,8 @@ struct TournamentView: View {
Divider() Divider()
if self.tournament.sharing == nil { if self.tournament.sharing == nil {
Button { NavigationLink(value: Screen.stateSettings) {
navigation.path.append(Screen.stateSettings) Label("Clôturer", systemImage: "stop.fill")
} label: {
Label("Clôture du tournoi", systemImage: "stop.fill")
Text("Annuler, supprimer ou terminer le tournoi")
} }
} else { } else {
Button { Button {

Loading…
Cancel
Save