|
|
|
|
@ -118,30 +118,6 @@ struct BroadcastView: View { |
|
|
|
|
|
|
|
|
|
if tournament.isPrivate == false { |
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
|
let links : [PageLink] = [.teams, .summons, .groupStages, .matches, .rankings, .broadcast, .clubBroadcast] |
|
|
|
|
Picker(selection: $pageLink) { |
|
|
|
|
ForEach(links) { pageLink in |
|
|
|
|
Text(pageLink.localizedLabel()).tag(pageLink) |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
Text("Choisir la page à partager") |
|
|
|
|
} |
|
|
|
|
.pickerStyle(.menu) |
|
|
|
|
actionForURL(title: "Partager la page '" + pageLink.localizedLabel() + "'", url: tournament.shareURL(pageLink)) |
|
|
|
|
} header: { |
|
|
|
|
Text("Lien du tournoi à partager") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
|
let club = tournament.club() |
|
|
|
|
actionForURL(title: (club == nil) ? "Aucun club indiqué pour ce tournoi" : club!.clubTitle(), description: "Page du club", url: club?.shareURL()) |
|
|
|
|
actionForURL(title: "Padel Club", url: URLs.main.url) |
|
|
|
|
} header: { |
|
|
|
|
Text("Autres liens") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
|
LabeledContent { |
|
|
|
|
if tournament.isTournamentPublished() { |
|
|
|
|
@ -156,14 +132,10 @@ struct BroadcastView: View { |
|
|
|
|
Text("Publication prévue") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if tournament.canBePublished() == false { |
|
|
|
|
Text("Pour être visible automatiquement, le tournoi doit avoir été créé il y a 24h, avoir une structure et au moins 4 inscriptions.") |
|
|
|
|
} |
|
|
|
|
} header: { |
|
|
|
|
Text("Information sur le tournoi") |
|
|
|
|
} footer: { |
|
|
|
|
if Date() < tournament.publishedTournamentDate() || tournament.canBePublished() == false { |
|
|
|
|
if Date() < tournament.publishedTournamentDate() || tournament.isTournamentPublished() == false { |
|
|
|
|
HStack { |
|
|
|
|
Spacer() |
|
|
|
|
FooterButtonView(tournament.publishTournament ? "masquer sur le site" : "publier maintenant") { |
|
|
|
|
@ -300,6 +272,36 @@ struct BroadcastView: View { |
|
|
|
|
//todo waitinglist & info |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.toolbar(content: { |
|
|
|
|
ToolbarItem(placement: .topBarTrailing) { |
|
|
|
|
Menu { |
|
|
|
|
Section { |
|
|
|
|
let links : [PageLink] = [.teams, .summons, .groupStages, .matches, .rankings, .broadcast, .clubBroadcast] |
|
|
|
|
Picker(selection: $pageLink) { |
|
|
|
|
ForEach(links) { pageLink in |
|
|
|
|
Text(pageLink.localizedLabel()).tag(pageLink) |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
Text("Choisir la page à partager") |
|
|
|
|
} |
|
|
|
|
.pickerStyle(.menu) |
|
|
|
|
actionForURL(title: "Partager la page '" + pageLink.localizedLabel() + "'", url: tournament.shareURL(pageLink)) |
|
|
|
|
} header: { |
|
|
|
|
Text("Lien du tournoi à partager") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
|
let club = tournament.club() |
|
|
|
|
actionForURL(title: (club == nil) ? "Aucun club indiqué pour ce tournoi" : club!.clubTitle(), description: "Page du club", url: club?.shareURL()) |
|
|
|
|
actionForURL(title: "Padel Club", url: URLs.main.url) |
|
|
|
|
} header: { |
|
|
|
|
Text("Autres liens") |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
Label("Partager les liens", systemImage: "square.and.arrow.up") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.headerProminence(.increased) |
|
|
|
|
.navigationTitle("Publication") |
|
|
|
|
.navigationBarTitleDisplayMode(.inline) |
|
|
|
|
|