|
|
|
|
@ -36,11 +36,19 @@ struct FileImportView: View { |
|
|
|
|
List { |
|
|
|
|
if teams.isEmpty { |
|
|
|
|
Section { |
|
|
|
|
|
|
|
|
|
Link(destination: URLs.beachPadel.url) { |
|
|
|
|
Label("beach-padel.app.fft.fr", systemImage: "tennisball") |
|
|
|
|
RowButtonView("Choisir le fichier", systemImage: "square.and.arrow.down") { |
|
|
|
|
convertingFile = false |
|
|
|
|
isShowing.toggle() |
|
|
|
|
} |
|
|
|
|
} footer: { |
|
|
|
|
if fileProvider == .frenchFederation { |
|
|
|
|
let footerString = "Fichier provenant de [beach-padel.app.fft.fr](\(URLs.beachPadel.rawValue))" |
|
|
|
|
Text(.init(footerString)) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if fileContent != nil { |
|
|
|
|
Section { |
|
|
|
|
Picker(selection: $fileProvider) { |
|
|
|
|
ForEach(FileImportManager.FileProvider.allCases) { |
|
|
|
|
Text($0.localizedLabel).tag($0) |
|
|
|
|
@ -48,17 +56,7 @@ struct FileImportView: View { |
|
|
|
|
} label: { |
|
|
|
|
Text("Source du fichier") |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Button { |
|
|
|
|
convertingFile = false |
|
|
|
|
isShowing.toggle() |
|
|
|
|
} label: { |
|
|
|
|
Label("Choisir le fichier", systemImage: "square.and.arrow.down") |
|
|
|
|
} |
|
|
|
|
} header: { |
|
|
|
|
|
|
|
|
|
} footer: { |
|
|
|
|
Text("Fichier provenant de beach-padel.app.fft.fr") |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|