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()
}
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) {
@ -281,9 +261,9 @@ struct TournamentView: View {
TournamentDeadlinesView(tournament: tournament)
}
.toolbarBackground(.visible, for: .navigationBar)
.navigationTitle("Rappel des délais")
.navigationTitle("Rappel des échéances")
} 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")
}
NavigationLink(value: Screen.statistics) {
Label("Statistiques", systemImage: "123.rectangle")
}
// NavigationLink(value: Screen.statistics) {
// Label("Statistiques", systemImage: "123.rectangle")
// }
//
NavigationLink(value: Screen.rankings) {
LabeledContent {
@ -306,10 +286,7 @@ struct TournamentView: View {
.foregroundStyle(.green)
}
} label: {
Text("Classement final")
if tournament.publishRankings == false {
Text("Vérifiez le classement avant de publier").foregroundStyle(.logoRed)
}
Label("Classement", systemImage: "trophy")
}
}
@ -330,11 +307,8 @@ struct TournamentView: View {
Divider()
if self.tournament.sharing == nil {
Button {
navigation.path.append(Screen.stateSettings)
} label: {
Label("Clôture du tournoi", systemImage: "stop.fill")
Text("Annuler, supprimer ou terminer le tournoi")
NavigationLink(value: Screen.stateSettings) {
Label("Clôturer", systemImage: "stop.fill")
}
} else {
Button {

Loading…
Cancel
Save