mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Expose sliding sync proxy URL on the server selection screen; make app more resilient to slidinc sync configuration errors, remove fatal errors
This commit is contained in:
committed by
Stefan Ceriu
parent
2fd0491a18
commit
276daf0355
+13
-12
@@ -17,18 +17,8 @@
|
||||
import SwiftUI
|
||||
|
||||
struct ServerSelectionScreen: View {
|
||||
// MARK: - Properties
|
||||
|
||||
// MARK: Private
|
||||
|
||||
@FocusState var isTextFieldFocused: Bool
|
||||
|
||||
// MARK: Public
|
||||
|
||||
@ObservedObject var context: ServerSelectionViewModel.Context
|
||||
|
||||
// MARK: Views
|
||||
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
VStack(spacing: 0) {
|
||||
@@ -69,8 +59,8 @@ struct ServerSelectionScreen: View {
|
||||
var serverForm: some View {
|
||||
VStack(alignment: .leading, spacing: 12) {
|
||||
TextField(ElementL10n.ftueAuthChooseServerEntryHint, text: $context.homeserverAddress)
|
||||
.focused($isTextFieldFocused)
|
||||
.textFieldStyle(.elementInput(footerText: context.viewState.footerMessage,
|
||||
.textFieldStyle(.elementInput(labelText: ElementL10n.hsUrl,
|
||||
footerText: context.viewState.footerMessage,
|
||||
isError: context.viewState.isShowingFooterError))
|
||||
.keyboardType(.URL)
|
||||
.autocapitalization(.none)
|
||||
@@ -80,6 +70,17 @@ struct ServerSelectionScreen: View {
|
||||
.onSubmit(submit)
|
||||
.accessibilityIdentifier("addressTextField")
|
||||
|
||||
Divider()
|
||||
|
||||
TextField(ElementL10n.ftueAuthChooseServerEntryHint, text: $context.slidingSyncProxyAddress)
|
||||
.textFieldStyle(.elementInput(labelText: "Sliding sync proxy URL"))
|
||||
.keyboardType(.URL)
|
||||
.autocapitalization(.none)
|
||||
.disableAutocorrection(true)
|
||||
.submitLabel(.done)
|
||||
.onSubmit(submit)
|
||||
.accessibilityIdentifier("slidingSyncProxyAddressTextField")
|
||||
|
||||
Button(action: submit) {
|
||||
Text(context.viewState.buttonTitle)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user