Add Authentication Flow WIP.

- Add Registration Screen.
- Add Server Selection Screen.
- Rename AuthenticationCoordinator to LegacyAuthenticationCoordinator.
- Add AuthenticationService and RegistrationWizard.
- Async extensions.
- Add global white and EMS colors to the themes.
- Add tests for server selection and registration screens.
- Accessibility and iPad layout tweaks.
- Remove MainActor from Auth Coordinators/VMs/Views.
(It broke the protocol conformances so now the methods and properties are marked individually.)
This commit is contained in:
Doug
2022-04-14 11:06:12 +01:00
committed by Doug
parent 60cff1d6bc
commit 282fe5c27e
53 changed files with 2870 additions and 66 deletions
@@ -58,6 +58,7 @@ struct RoundedBorderTextField: View {
.font(theme.fonts.callout)
.foregroundColor(theme.colors.tertiaryContent)
.lineLimit(1)
.accessibilityHidden(true)
}
if isEnabled {
ThemableTextField(placeholder: "", text: $text, configuration: configuration, onEditingChanged: { edit in
@@ -66,22 +67,24 @@ struct RoundedBorderTextField: View {
})
.makeFirstResponder(isFirstResponder)
.showClearButton(text: $text)
.onChange(of: text, perform: { newText in
.onChange(of: text) { newText in
onTextChanged?(newText)
})
}
.frame(height: 30)
.accessibilityLabel(text.isEmpty ? placeHolder : "")
} else {
ThemableTextField(placeholder: "", text: $text, configuration: configuration, onEditingChanged: { edit in
self.editing = edit
onEditingChanged?(edit)
})
.makeFirstResponder(isFirstResponder)
.onChange(of: text, perform: { newText in
.onChange(of: text) { newText in
onTextChanged?(newText)
})
}
.frame(height: 30)
.allowsHitTesting(false)
.opacity(0.5)
.accessibilityLabel(text.isEmpty ? placeHolder : "")
}
}
.padding(EdgeInsets(top: 8, leading: 8, bottom: 8, trailing: text.isEmpty ? 8 : 0))