mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 00:52:43 +02:00
MESSENGER-4231 add new loginflow
This commit is contained in:
+21
@@ -67,6 +67,9 @@ struct AuthenticationServerSelectionScreen: View {
|
||||
message: Text(BWIL10n.authenticationServerSelectionServerDeniedMessage),
|
||||
dismissButton: .default(Text(VectorL10n.ok)))
|
||||
}
|
||||
if BWIBuildSettings.shared.authScreenShowTestServerOptions {
|
||||
serverSelectionButton
|
||||
}
|
||||
}
|
||||
.readableFrame()
|
||||
.padding(.horizontal, 16)
|
||||
@@ -221,6 +224,24 @@ struct AuthenticationServerSelectionScreen: View {
|
||||
UIApplication.shared.open(url, options: [:], completionHandler: nil)
|
||||
}
|
||||
}
|
||||
|
||||
// bwi: show server selection button
|
||||
var serverSelectionButton: some View {
|
||||
VStack() {
|
||||
Menu(content: {
|
||||
ForEach(ServerURLHelper.shared.serverSettings, id: \.self) { server in
|
||||
Button(server.name, action: {
|
||||
viewModel.homeserverAddress = server.serverUrl
|
||||
})
|
||||
}
|
||||
}, label: {
|
||||
Button(action: { return }) {
|
||||
Text(BWIL10n.bwiAuthBetaSelectionButtonTitle)
|
||||
}
|
||||
.buttonStyle(PrimaryActionButtonStyle())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user