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. 18
      PadelClub/Views/Tournament/Screen/RegistrationSetupView.swift

@ -8,6 +8,7 @@
import SwiftUI import SwiftUI
struct CopyPasteButtonView: View { struct CopyPasteButtonView: View {
var title: String?
let pasteValue: String? let pasteValue: String?
@State private var copied: Bool = false @State private var copied: Bool = false
@ -20,6 +21,9 @@ struct CopyPasteButtonView: View {
copied = true copied = true
} label: { } label: {
Label(copied ? "Copié" : "Copier", systemImage: "doc.on.doc").symbolVariant(copied ? .fill : .none) 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 { .contextMenu {
CopyPasteButtonView(pasteValue: player.formattedLicense()) CopyPasteButtonView(title: "Licence", pasteValue: player.formattedLicense())
} }
} }
} }

@ -19,7 +19,7 @@ struct BroadcastView: View {
let filter = CIFilter.qrCodeGenerator() let filter = CIFilter.qrCodeGenerator()
@State private var urlToShow: String? @State private var urlToShow: String?
@State private var tvMode: Bool = false @State private var tvMode: Bool = false
@State private var pageLink: PageLink = .matches @State private var pageLink: PageLink = .info
let createAccountTip = CreateAccountTip() let createAccountTip = CreateAccountTip()
let tournamentPublishingTip = TournamentPublishingTip() let tournamentPublishingTip = TournamentPublishingTip()
@ -269,7 +269,7 @@ struct BroadcastView: View {
ToolbarItem(placement: .topBarTrailing) { ToolbarItem(placement: .topBarTrailing) {
Menu { Menu {
Section { 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) { Picker(selection: $pageLink) {
ForEach(links) { pageLink in ForEach(links) { pageLink in
Text(pageLink.localizedLabel()).tag(pageLink) Text(pageLink.localizedLabel()).tag(pageLink)

@ -75,7 +75,7 @@ struct RegistrationSetupView: View {
List { List {
Section { Section {
Toggle(isOn: $enableOnlineRegistration) { Toggle(isOn: $enableOnlineRegistration) {
Text("Inscription en ligne") Text("Activer")
} }
} footer: { } 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.") 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 enableOnlineRegistration {
if let shareURL = tournament.shareURL(.info) { if let shareURL = tournament.shareURL(.info) {
Section { Section {
Text(shareURL.absoluteString)
ShareLink(item: shareURL) {
Text("Partager le lien")
}
Link(destination: shareURL) { Link(destination: shareURL) {
Text("Ouvrir le lien") Text(shareURL.absoluteString)
} }
} header: { } header: {
Text("Page d'inscription") Text("Page d'inscription")
} footer: { } footer: {
CopyPasteButtonView(pasteValue: shareURL.absoluteString) HStack {
CopyPasteButtonView(pasteValue: shareURL.absoluteString)
Spacer()
ShareLink(item: shareURL) {
Label("Partager", systemImage: "square.and.arrow.up")
}
}
} }
} }

Loading…
Cancel
Save