login fix
This commit is contained in:
parent
b21116ff6b
commit
bbb79c25e2
@ -18,67 +18,27 @@ struct LoginView: View {
|
|||||||
var body: some View {
|
var body: some View {
|
||||||
ZStack {
|
ZStack {
|
||||||
Color.appBackground.ignoresSafeArea()
|
Color.appBackground.ignoresSafeArea()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
formPanel
|
formPanel
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//.preferredColorScheme(.light)
|
//.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 {
|
private var formPanel: some View {
|
||||||
VStack(spacing: 0) {
|
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: 24) {
|
||||||
VStack(alignment: .leading, spacing: 10) {
|
Text("Aceda aqui à sua conta")
|
||||||
if UIDevice.current.userInterfaceIdiom == .phone {
|
.font(.jakartaBold24)
|
||||||
Image("splashLogo")
|
.foregroundStyle(.white)
|
||||||
.resizable()
|
|
||||||
.scaledToFit()
|
|
||||||
.frame(width: 120, height: 76)
|
|
||||||
.accessibilityHidden(true)
|
|
||||||
Spacer()
|
|
||||||
}
|
|
||||||
|
|
||||||
Text("Aceda aqui à sua conta")
|
|
||||||
.font(.jakartaBold24)
|
|
||||||
.foregroundStyle(.white)
|
|
||||||
}
|
|
||||||
|
|
||||||
VStack(spacing: 14) {
|
VStack(spacing: 14) {
|
||||||
loginField(
|
loginField(
|
||||||
@ -102,8 +62,7 @@ struct LoginView: View {
|
|||||||
.fixedSize(horizontal: false, vertical: true)
|
.fixedSize(horizontal: false, vertical: true)
|
||||||
.accessibilityLabel("Erro de autenticacao: \(errorMessage)")
|
.accessibilityLabel("Erro de autenticacao: \(errorMessage)")
|
||||||
}
|
}
|
||||||
Spacer()
|
|
||||||
Spacer()
|
|
||||||
Button {
|
Button {
|
||||||
focusedField = nil
|
focusedField = nil
|
||||||
Task {
|
Task {
|
||||||
@ -128,21 +87,21 @@ struct LoginView: View {
|
|||||||
.disabled(!viewModel.canSubmit)
|
.disabled(!viewModel.canSubmit)
|
||||||
.opacity(viewModel.canSubmit ? 1 : 0.55)
|
.opacity(viewModel.canSubmit ? 1 : 0.55)
|
||||||
.accessibilityHint("Inicia sessao na conta de doente")
|
.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)
|
.padding(.horizontal, 32)
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
Text("MedMap")
|
VStack(spacing: 8) {
|
||||||
.font(.jakartaRegular12)
|
Text("Não tem conta? Criar conta")
|
||||||
.foregroundStyle(.white.opacity(0.6))
|
.font(.jakartaRegular14)
|
||||||
.padding(.bottom, 24)
|
.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