online_reg
Raz 11 months ago
parent b4e267f695
commit e5c4ea0837
  1. 4
      PadelClub/Views/Components/CopyPasteButtonView.swift
  2. 2
      PadelClub/Views/Shared/ImportedPlayerView.swift
  3. 4
      PadelClub/Views/Tournament/Screen/BroadcastView.swift
  4. 16
      PadelClub/Views/Tournament/Screen/RegistrationSetupView.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)
}
}
}
}

@ -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 {
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: {
HStack {
CopyPasteButtonView(pasteValue: shareURL.absoluteString)
Spacer()
ShareLink(item: shareURL) {
Label("Partager", systemImage: "square.and.arrow.up")
}
}
}
}

Loading…
Cancel
Save