|
|
|
@ -113,10 +113,7 @@ struct BroadcastView: View { |
|
|
|
.foregroundStyle(.logoRed) |
|
|
|
.foregroundStyle(.logoRed) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
#if DEBUG |
|
|
|
.disabled(_disablePrivateToggle()) |
|
|
|
#else |
|
|
|
|
|
|
|
.disabled((tournament.isPrivate && Guard.main.purchasedTransactions.isEmpty)) |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
} footer: { |
|
|
|
} footer: { |
|
|
|
let verb : String = tournament.isPrivate ? "est" : "sera" |
|
|
|
let verb : String = tournament.isPrivate ? "est" : "sera" |
|
|
|
let footerString = " Le tournoi \(verb) masqué sur le site [Padel Club](\(URLs.main.rawValue))" |
|
|
|
let footerString = " Le tournoi \(verb) masqué sur le site [Padel Club](\(URLs.main.rawValue))" |
|
|
|
@ -326,6 +323,14 @@ struct BroadcastView: View { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private func _disablePrivateToggle() -> Bool { |
|
|
|
|
|
|
|
#if DEBUG |
|
|
|
|
|
|
|
return false |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
return (tournament.isPrivate && Guard.main.purchasedTransactions.isEmpty) |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private func _save() { |
|
|
|
private func _save() { |
|
|
|
do { |
|
|
|
do { |
|
|
|
if [tournament.publishTeams, tournament.publishSummons, tournament.publishBrackets, tournament.publishGroupStages].anySatisfy({ $0 == true }) { |
|
|
|
if [tournament.publishTeams, tournament.publishSummons, tournament.publishBrackets, tournament.publishGroupStages].anySatisfy({ $0 == true }) { |
|
|
|
|