loginview
This commit is contained in:
parent
a483f06f39
commit
e0190cf3bb
@ -422,6 +422,7 @@
|
|||||||
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
|
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
|
||||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 26.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
@ -454,6 +455,7 @@
|
|||||||
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
|
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
|
||||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||||
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
|
||||||
|
IPHONEOS_DEPLOYMENT_TARGET = 26.0;
|
||||||
LD_RUNPATH_SEARCH_PATHS = (
|
LD_RUNPATH_SEARCH_PATHS = (
|
||||||
"$(inherited)",
|
"$(inherited)",
|
||||||
"@executable_path/Frameworks",
|
"@executable_path/Frameworks",
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
|
import SwiftUI
|
||||||
|
import Combine
|
||||||
@MainActor
|
@MainActor
|
||||||
final class DashboardViewModel: ViewModel {
|
final class DashboardViewModel: ViewModel {
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,8 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
import Foundation
|
import Foundation
|
||||||
|
import SwiftUI
|
||||||
|
import Combine
|
||||||
@MainActor
|
@MainActor
|
||||||
final class LoginViewModel: ViewModel {
|
final class LoginViewModel: ViewModel {
|
||||||
|
|
||||||
|
|||||||
@ -19,29 +19,18 @@ struct LoginView: View {
|
|||||||
ZStack {
|
ZStack {
|
||||||
Color.appBackground.ignoresSafeArea()
|
Color.appBackground.ignoresSafeArea()
|
||||||
|
|
||||||
GeometryReader { geometry in
|
|
||||||
let usesTwoColumns = geometry.size.width > 700
|
|
||||||
|
|
||||||
Group {
|
formPanel
|
||||||
if usesTwoColumns {
|
|
||||||
HStack(spacing: 0) {
|
|
||||||
brandPanel
|
|
||||||
.frame(width: geometry.size.width * 0.44)
|
|
||||||
formPanel
|
|
||||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
formPanel
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.preferredColorScheme(.light)
|
//.preferredColorScheme(.light)
|
||||||
}
|
}
|
||||||
|
|
||||||
private var brandPanel: some View {
|
private var brandPanel: some View {
|
||||||
ZStack(alignment: .bottomLeading) {
|
ZStack(alignment: .bottomLeading) {
|
||||||
Color(hex: "#315F98")
|
Color.appBackground.ignoresSafeArea()
|
||||||
|
|
||||||
Image("splashImage")
|
Image("splashImage")
|
||||||
.resizable()
|
.resizable()
|
||||||
@ -71,6 +60,8 @@ struct LoginView: View {
|
|||||||
|
|
||||||
private var formPanel: some View {
|
private var formPanel: some View {
|
||||||
VStack(spacing: 0) {
|
VStack(spacing: 0) {
|
||||||
|
|
||||||
|
|
||||||
Spacer(minLength: 32)
|
Spacer(minLength: 32)
|
||||||
|
|
||||||
VStack(alignment: .leading, spacing: 28) {
|
VStack(alignment: .leading, spacing: 28) {
|
||||||
@ -86,10 +77,7 @@ struct LoginView: View {
|
|||||||
Text("Bem-vindo de volta")
|
Text("Bem-vindo de volta")
|
||||||
.font(.jakartaBold24)
|
.font(.jakartaBold24)
|
||||||
.foregroundStyle(Color.appTextPrimary)
|
.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) {
|
VStack(spacing: 18) {
|
||||||
@ -132,14 +120,14 @@ struct LoginView: View {
|
|||||||
.frame(maxWidth: .infinity)
|
.frame(maxWidth: .infinity)
|
||||||
.frame(height: 52)
|
.frame(height: 52)
|
||||||
}
|
}
|
||||||
.foregroundStyle(.white)
|
|
||||||
.background(Color.appBackground)
|
|
||||||
.clipShape(RoundedRectangle(cornerRadius: 8))
|
.clipShape(RoundedRectangle(cornerRadius: 8))
|
||||||
.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")
|
||||||
}
|
}
|
||||||
.frame(maxWidth: 430)
|
|
||||||
.padding(.horizontal, 32)
|
.padding(.horizontal, 32)
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
@ -149,7 +137,7 @@ struct LoginView: View {
|
|||||||
.foregroundStyle(Color.appTextPrimary.opacity(0.45))
|
.foregroundStyle(Color.appTextPrimary.opacity(0.45))
|
||||||
.padding(.bottom, 24)
|
.padding(.bottom, 24)
|
||||||
}
|
}
|
||||||
.background(Color.white)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private var passwordField: some View {
|
private var passwordField: some View {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user