login fix
This commit is contained in:
parent
b21116ff6b
commit
bbb79c25e2
@ -18,67 +18,27 @@ struct LoginView: View {
|
||||
var body: some View {
|
||||
ZStack {
|
||||
Color.appBackground.ignoresSafeArea()
|
||||
|
||||
|
||||
|
||||
|
||||
formPanel
|
||||
|
||||
|
||||
|
||||
}
|
||||
//.preferredColorScheme(.light)
|
||||
}
|
||||
|
||||
private var brandPanel: some View {
|
||||
ZStack(alignment: .bottomLeading) {
|
||||
Color.appBackground.ignoresSafeArea()
|
||||
|
||||
Image("splashImage")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(maxWidth: 360)
|
||||
.padding(40)
|
||||
.accessibilityHidden(true)
|
||||
|
||||
VStack(alignment: .leading, spacing: 10) {
|
||||
Image("splashLogo")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 146, height: 96)
|
||||
.accessibilityHidden(true)
|
||||
Text("MedMap")
|
||||
.font(.jakartaBold24)
|
||||
.foregroundStyle(.white)
|
||||
Text("Acompanhamento simples da sua medicacao.")
|
||||
.font(.jakartaRegular16)
|
||||
.foregroundStyle(.white.opacity(0.84))
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
}
|
||||
.padding(44)
|
||||
}
|
||||
.ignoresSafeArea()
|
||||
}
|
||||
|
||||
private var formPanel: some View {
|
||||
VStack(spacing: 0) {
|
||||
Image("splashLogo")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 120, height: 76)
|
||||
.accessibilityHidden(true)
|
||||
.padding(.top, 32)
|
||||
|
||||
|
||||
Spacer()
|
||||
|
||||
VStack(alignment: .leading, spacing: 24) {
|
||||
VStack(alignment: .leading, spacing: 10) {
|
||||
if UIDevice.current.userInterfaceIdiom == .phone {
|
||||
Image("splashLogo")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 120, height: 76)
|
||||
.accessibilityHidden(true)
|
||||
Spacer()
|
||||
}
|
||||
|
||||
Text("Aceda aqui à sua conta")
|
||||
.font(.jakartaBold24)
|
||||
.foregroundStyle(.white)
|
||||
}
|
||||
Text("Aceda aqui à sua conta")
|
||||
.font(.jakartaBold24)
|
||||
.foregroundStyle(.white)
|
||||
|
||||
VStack(spacing: 14) {
|
||||
loginField(
|
||||
@ -102,8 +62,7 @@ struct LoginView: View {
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.accessibilityLabel("Erro de autenticacao: \(errorMessage)")
|
||||
}
|
||||
Spacer()
|
||||
Spacer()
|
||||
|
||||
Button {
|
||||
focusedField = nil
|
||||
Task {
|
||||
@ -128,21 +87,21 @@ struct LoginView: View {
|
||||
.disabled(!viewModel.canSubmit)
|
||||
.opacity(viewModel.canSubmit ? 1 : 0.55)
|
||||
.accessibilityHint("Inicia sessao na conta de doente")
|
||||
Spacer()
|
||||
Text("Não tem conta? Criar conta")
|
||||
.font(.jakartaRegular14)
|
||||
.foregroundStyle(.white.opacity(0.88))
|
||||
.frame(maxWidth: .infinity)
|
||||
.multilineTextAlignment(.center)
|
||||
}
|
||||
.padding(.horizontal, 32)
|
||||
|
||||
Spacer()
|
||||
|
||||
Text("MedMap")
|
||||
.font(.jakartaRegular12)
|
||||
.foregroundStyle(.white.opacity(0.6))
|
||||
.padding(.bottom, 24)
|
||||
VStack(spacing: 8) {
|
||||
Text("Não tem conta? Criar conta")
|
||||
.font(.jakartaRegular14)
|
||||
.foregroundStyle(.white.opacity(0.88))
|
||||
|
||||
Text("MedMap")
|
||||
.font(.jakartaRegular12)
|
||||
.foregroundStyle(.white.opacity(0.6))
|
||||
}
|
||||
.padding(.bottom, 24)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user