|
|
|
|
@ -113,7 +113,9 @@ struct PlayerDetailView: View { |
|
|
|
|
Section { |
|
|
|
|
LabeledContent { |
|
|
|
|
TextField("Licence", text: $licenceId) |
|
|
|
|
.focused($focusedField, equals: ._licenceId) |
|
|
|
|
.keyboardType(.alphabet) |
|
|
|
|
.textContentType(nil) |
|
|
|
|
.multilineTextAlignment(.trailing) |
|
|
|
|
.autocorrectionDisabled() |
|
|
|
|
.frame(maxWidth: .infinity) |
|
|
|
|
@ -121,17 +123,24 @@ struct PlayerDetailView: View { |
|
|
|
|
player.licenceId = licenceId |
|
|
|
|
_save() |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
Menu { |
|
|
|
|
CopyPasteButtonView(pasteValue: player.licenceId) |
|
|
|
|
PasteButtonView(text: $licenceId) |
|
|
|
|
.onChange(of: licenceId) { |
|
|
|
|
player.licenceId = licenceId |
|
|
|
|
_save() |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
Text("Licence") |
|
|
|
|
} |
|
|
|
|
} footer: { |
|
|
|
|
CopyPasteButtonView(pasteValue: player.licenceId?.strippedLicense) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
|
LabeledContent { |
|
|
|
|
TextField("Téléphone", text: $phoneNumber) |
|
|
|
|
.focused($focusedField, equals: ._phoneNumber) |
|
|
|
|
.keyboardType(.namePhonePad) |
|
|
|
|
.textContentType(nil) |
|
|
|
|
.multilineTextAlignment(.trailing) |
|
|
|
|
.autocorrectionDisabled() |
|
|
|
|
.frame(maxWidth: .infinity) |
|
|
|
|
@ -139,17 +148,24 @@ struct PlayerDetailView: View { |
|
|
|
|
player.phoneNumber = phoneNumber |
|
|
|
|
_save() |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
Menu { |
|
|
|
|
CopyPasteButtonView(pasteValue: player.phoneNumber) |
|
|
|
|
PasteButtonView(text: $phoneNumber) |
|
|
|
|
.onChange(of: phoneNumber) { |
|
|
|
|
player.phoneNumber = phoneNumber |
|
|
|
|
_save() |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
Text("Téléphone") |
|
|
|
|
} |
|
|
|
|
} footer: { |
|
|
|
|
CopyPasteButtonView(pasteValue: player.phoneNumber) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Section { |
|
|
|
|
LabeledContent { |
|
|
|
|
TextField("Email", text: $email) |
|
|
|
|
.focused($focusedField, equals: ._email) |
|
|
|
|
.keyboardType(.emailAddress) |
|
|
|
|
.textContentType(nil) |
|
|
|
|
.multilineTextAlignment(.trailing) |
|
|
|
|
.autocorrectionDisabled() |
|
|
|
|
.frame(maxWidth: .infinity) |
|
|
|
|
@ -157,13 +173,19 @@ struct PlayerDetailView: View { |
|
|
|
|
player.email = email |
|
|
|
|
_save() |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
Menu { |
|
|
|
|
CopyPasteButtonView(pasteValue: player.email) |
|
|
|
|
PasteButtonView(text: $email) |
|
|
|
|
.onChange(of: email) { |
|
|
|
|
player.email = email |
|
|
|
|
_save() |
|
|
|
|
} |
|
|
|
|
} label: { |
|
|
|
|
Text("Email") |
|
|
|
|
} |
|
|
|
|
} footer: { |
|
|
|
|
CopyPasteButtonView(pasteValue: player.email) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
.toolbar { |
|
|
|
|
ToolbarItem(placement: .topBarTrailing) { |
|
|
|
|
|