loginview
This commit is contained in:
parent
a483f06f39
commit
e0190cf3bb
@ -422,6 +422,7 @@
|
||||
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 26.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
@ -454,6 +455,7 @@
|
||||
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 26.0;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import Foundation
|
||||
|
||||
import SwiftUI
|
||||
import Combine
|
||||
@MainActor
|
||||
final class DashboardViewModel: ViewModel {
|
||||
|
||||
|
||||
@ -4,7 +4,8 @@
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
import SwiftUI
|
||||
import Combine
|
||||
@MainActor
|
||||
final class LoginViewModel: ViewModel {
|
||||
|
||||
@ -49,4 +50,4 @@ final class LoginViewModel: ViewModel {
|
||||
fluxlog("Patient login failed: \(error.localizedDescription)")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -18,30 +18,19 @@ struct LoginView: View {
|
||||
var body: some View {
|
||||
ZStack {
|
||||
Color.appBackground.ignoresSafeArea()
|
||||
|
||||
GeometryReader { geometry in
|
||||
let usesTwoColumns = geometry.size.width > 700
|
||||
|
||||
Group {
|
||||
if usesTwoColumns {
|
||||
HStack(spacing: 0) {
|
||||
brandPanel
|
||||
.frame(width: geometry.size.width * 0.44)
|
||||
formPanel
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
}
|
||||
} else {
|
||||
formPanel
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
formPanel
|
||||
|
||||
|
||||
|
||||
}
|
||||
.preferredColorScheme(.light)
|
||||
//.preferredColorScheme(.light)
|
||||
}
|
||||
|
||||
private var brandPanel: some View {
|
||||
ZStack(alignment: .bottomLeading) {
|
||||
Color(hex: "#315F98")
|
||||
Color.appBackground.ignoresSafeArea()
|
||||
|
||||
Image("splashImage")
|
||||
.resizable()
|
||||
@ -71,6 +60,8 @@ struct LoginView: View {
|
||||
|
||||
private var formPanel: some View {
|
||||
VStack(spacing: 0) {
|
||||
|
||||
|
||||
Spacer(minLength: 32)
|
||||
|
||||
VStack(alignment: .leading, spacing: 28) {
|
||||
@ -86,10 +77,7 @@ struct LoginView: View {
|
||||
Text("Bem-vindo de volta")
|
||||
.font(.jakartaBold24)
|
||||
.foregroundStyle(Color.appTextPrimary)
|
||||
Text("Entre na sua conta de doente para consultar o seu plano de medicacao.")
|
||||
.font(.jakartaRegular16)
|
||||
.foregroundStyle(Color.appTextPrimary.opacity(0.68))
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
|
||||
}
|
||||
|
||||
VStack(spacing: 18) {
|
||||
@ -132,14 +120,14 @@ struct LoginView: View {
|
||||
.frame(maxWidth: .infinity)
|
||||
.frame(height: 52)
|
||||
}
|
||||
.foregroundStyle(.white)
|
||||
.background(Color.appBackground)
|
||||
|
||||
|
||||
.clipShape(RoundedRectangle(cornerRadius: 8))
|
||||
.disabled(!viewModel.canSubmit)
|
||||
.opacity(viewModel.canSubmit ? 1 : 0.55)
|
||||
.accessibilityHint("Inicia sessao na conta de doente")
|
||||
}
|
||||
.frame(maxWidth: 430)
|
||||
|
||||
.padding(.horizontal, 32)
|
||||
|
||||
Spacer()
|
||||
@ -149,7 +137,7 @@ struct LoginView: View {
|
||||
.foregroundStyle(Color.appTextPrimary.opacity(0.45))
|
||||
.padding(.bottom, 24)
|
||||
}
|
||||
.background(Color.white)
|
||||
|
||||
}
|
||||
|
||||
private var passwordField: some View {
|
||||
@ -226,4 +214,4 @@ struct LoginView: View {
|
||||
|
||||
#Preview {
|
||||
LoginView()
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user