Allow registration on matrix.org using a custom helper URL. (#3282)

This commit is contained in:
Doug
2024-09-16 13:05:22 +01:00
committed by GitHub
parent 6cfe09b96d
commit 6efbf6117f
15 changed files with 129 additions and 42 deletions
@@ -99,6 +99,14 @@ struct AuthenticationStartScreen: View {
}
.buttonStyle(.compound(.primary))
.accessibilityIdentifier(A11yIdentifiers.authenticationStartScreen.signIn)
if context.viewState.isWebRegistrationEnabled {
Button { context.send(viewAction: .register) } label: {
Text(L10n.screenCreateAccountTitle)
.padding(14)
}
.buttonStyle(.compound(.plain))
}
}
.padding(.horizontal, verticalSizeClass == .compact ? 128 : 24)
.readableFrame()
@@ -108,7 +116,7 @@ struct AuthenticationStartScreen: View {
// MARK: - Previews
struct AuthenticationStartScreen_Previews: PreviewProvider, TestablePreview {
static let viewModel = AuthenticationStartScreenViewModel()
static let viewModel = AuthenticationStartScreenViewModel(webRegistrationEnabled: true)
static var previews: some View {
AuthenticationStartScreen(context: viewModel.context)