mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 00:24:43 +02:00
Update use case, registration and login screens.
Remove "Custom server" button from use case screen. Remove matrix.org description. Add username availability to registration screen.
This commit is contained in:
+17
-41
@@ -29,6 +29,23 @@ struct OnboardingUseCaseSelectionScreen: View {
|
||||
|
||||
@ObservedObject var viewModel: OnboardingUseCaseViewModel.Context
|
||||
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
VStack(spacing: 0) {
|
||||
titleContent
|
||||
.padding(.bottom, 36)
|
||||
|
||||
useCaseButtons
|
||||
}
|
||||
.readableFrame()
|
||||
.padding(.top, OnboardingMetrics.topPaddingToNavigationBar)
|
||||
.padding(.bottom, 8)
|
||||
.padding(.horizontal, 16)
|
||||
}
|
||||
.background(theme.colors.background.ignoresSafeArea())
|
||||
.accentColor(theme.colors.accent)
|
||||
}
|
||||
|
||||
/// The screen's title and instructions.
|
||||
var titleContent: some View {
|
||||
VStack(spacing: 8) {
|
||||
@@ -76,47 +93,6 @@ struct OnboardingUseCaseSelectionScreen: View {
|
||||
.padding(.top, 8)
|
||||
}
|
||||
}
|
||||
|
||||
/// A footer showing a button to connect to a server.
|
||||
var serverFooter: some View {
|
||||
VStack(spacing: 14) {
|
||||
Text(VectorL10n.onboardingUseCaseExistingServerMessage)
|
||||
.font(theme.fonts.subheadline)
|
||||
.multilineTextAlignment(.center)
|
||||
.foregroundColor(theme.colors.tertiaryContent)
|
||||
|
||||
Button { viewModel.send(viewAction: .answer(.customServer)) } label: {
|
||||
Text(VectorL10n.onboardingUseCaseExistingServerButton)
|
||||
.font(theme.fonts.body)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
GeometryReader { geometry in
|
||||
VStack {
|
||||
ScrollView {
|
||||
VStack(spacing: 0) {
|
||||
titleContent
|
||||
.padding(.bottom, 36)
|
||||
|
||||
useCaseButtons
|
||||
}
|
||||
.readableFrame()
|
||||
.padding(.top, OnboardingMetrics.topPaddingToNavigationBar)
|
||||
.padding(.bottom, 8)
|
||||
.padding(.horizontal, 16)
|
||||
}
|
||||
|
||||
serverFooter
|
||||
.padding(.horizontal, 16)
|
||||
.padding(.top, 8)
|
||||
.padding(.bottom, geometry.safeAreaInsets.bottom > 0 ? 20 : 36)
|
||||
}
|
||||
}
|
||||
.background(theme.colors.background.ignoresSafeArea())
|
||||
.accentColor(theme.colors.accent)
|
||||
}
|
||||
}
|
||||
|
||||
// MARK: - Previews
|
||||
|
||||
Reference in New Issue
Block a user