@ -8,6 +8,7 @@
import SwiftUI
struct CopyPasteButtonView: View {
var title: String?
let pasteValue: String?
@State private var copied: Bool = false
@ -20,6 +21,9 @@ struct CopyPasteButtonView: View {
copied = true
} label: {
Label(copied ? "Copié" : "Copier", systemImage: "doc.on.doc").symbolVariant(copied ? .fill : .none)
if let title {
Text(title)
}
@ -115,7 +115,7 @@ struct ImportedPlayerView: View {
.contextMenu {
CopyPasteButtonView(pasteValue: player.formattedLicense())
CopyPasteButtonView(title: "Licence", pasteValue: player.formattedLicense())
@ -19,7 +19,7 @@ struct BroadcastView: View {
let filter = CIFilter.qrCodeGenerator()
@State private var urlToShow: String?
@State private var tvMode: Bool = false
@State private var pageLink: PageLink = .matches
@State private var pageLink: PageLink = .info
let createAccountTip = CreateAccountTip()
let tournamentPublishingTip = TournamentPublishingTip()
@ -269,7 +269,7 @@ struct BroadcastView: View {
ToolbarItem(placement: .topBarTrailing) {
Menu {
Section {
let links : [PageLink] = [.teams, .summons, .groupStages, .matches, .rankings, .broadcast, .clubBroadcast]
let links : [PageLink] = [.info, .teams, .summons, .groupStages, .matches, .rankings, .broadcast, .clubBroadcast]
Picker(selection: $pageLink) {
ForEach(links) { pageLink in
Text(pageLink.localizedLabel()).tag(pageLink)
@ -75,7 +75,7 @@ struct RegistrationSetupView: View {
List {
Toggle(isOn: $enableOnlineRegistration) {
Text("Inscription en ligne")
Text("Activer")
} footer: {
Text("Les inscriptions en ligne permettent à des joueurs de s'inscrire à votre tournoi en passant par le site Padel Club. Vous verrez alors votre liste d'inscription s'agrandir dans la vue Gestion des Inscriptions de l'application.")
@ -84,19 +84,19 @@ struct RegistrationSetupView: View {
if enableOnlineRegistration {
if let shareURL = tournament.shareURL(.info) {
Text(shareURL.absoluteString)
ShareLink(item: shareURL) {
Text("Partager le lien")
Link(destination: shareURL) {
Text("Ouvrir le lien")
} header: {
Text("Page d'inscription")
CopyPasteButtonView(pasteValue: shareURL.absoluteString)
HStack {
Spacer()
Label("Partager", systemImage: "square.and.arrow.up")