diff --git a/PadelClub/Views/Components/CopyPasteButtonView.swift b/PadelClub/Views/Components/CopyPasteButtonView.swift index 0b5c976..b70b95b 100644 --- a/PadelClub/Views/Components/CopyPasteButtonView.swift +++ b/PadelClub/Views/Components/CopyPasteButtonView.swift @@ -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) + } } } } diff --git a/PadelClub/Views/Shared/ImportedPlayerView.swift b/PadelClub/Views/Shared/ImportedPlayerView.swift index 4843241..67b659e 100644 --- a/PadelClub/Views/Shared/ImportedPlayerView.swift +++ b/PadelClub/Views/Shared/ImportedPlayerView.swift @@ -115,7 +115,7 @@ struct ImportedPlayerView: View { } } .contextMenu { - CopyPasteButtonView(pasteValue: player.formattedLicense()) + CopyPasteButtonView(title: "Licence", pasteValue: player.formattedLicense()) } } } diff --git a/PadelClub/Views/Tournament/Screen/BroadcastView.swift b/PadelClub/Views/Tournament/Screen/BroadcastView.swift index 4e12408..4dcc1ba 100644 --- a/PadelClub/Views/Tournament/Screen/BroadcastView.swift +++ b/PadelClub/Views/Tournament/Screen/BroadcastView.swift @@ -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) diff --git a/PadelClub/Views/Tournament/Screen/RegistrationSetupView.swift b/PadelClub/Views/Tournament/Screen/RegistrationSetupView.swift index f279b67..efddaa1 100644 --- a/PadelClub/Views/Tournament/Screen/RegistrationSetupView.swift +++ b/PadelClub/Views/Tournament/Screen/RegistrationSetupView.swift @@ -75,7 +75,7 @@ struct RegistrationSetupView: View { List { Section { 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) { Section { - Text(shareURL.absoluteString) - - ShareLink(item: shareURL) { - Text("Partager le lien") - } - Link(destination: shareURL) { - Text("Ouvrir le lien") + Text(shareURL.absoluteString) } } header: { Text("Page d'inscription") } footer: { - CopyPasteButtonView(pasteValue: shareURL.absoluteString) + HStack { + CopyPasteButtonView(pasteValue: shareURL.absoluteString) + Spacer() + ShareLink(item: shareURL) { + Label("Partager", systemImage: "square.and.arrow.up") + } + } } }