54 lines
1.8 KiB
Swift
54 lines
1.8 KiB
Swift
|
import SwiftUI
|
||
|
|
||
|
struct WelcomeScreen: View {
|
||
|
@EnvironmentObject var store: AppStore
|
||
|
|
||
|
public var body: some View {
|
||
|
ZStack {
|
||
|
// background
|
||
|
Color.Main.backgroundLight
|
||
|
.ignoresSafeArea()
|
||
|
|
||
|
// content
|
||
|
VStack(spacing: 32) {
|
||
|
// icon
|
||
|
Image.logo
|
||
|
.resizable()
|
||
|
.aspectRatio(contentMode: .fit)
|
||
|
.frame(width: 120, height: 120)
|
||
|
|
||
|
// texts
|
||
|
VStack(spacing: 10) {
|
||
|
Text(L10n.Global.name)
|
||
|
.font(.head1r)
|
||
|
.foregroundColor(.Material.tortoiseDark500)
|
||
|
.fixedSize(horizontal: true, vertical: false)
|
||
|
Text(L10n.Start.subtitle)
|
||
|
.font(.body2)
|
||
|
.foregroundColor(.Material.tortoiseDark300)
|
||
|
.fixedSize(horizontal: false, vertical: true)
|
||
|
.multilineTextAlignment(.center)
|
||
|
}
|
||
|
|
||
|
// buttons
|
||
|
VStack(spacing: 16) {
|
||
|
Button {
|
||
|
store.dispatch(.accountsAction(.goTo(.addAccount)))
|
||
|
store.dispatch(.changeFlow(.accounts))
|
||
|
} label: {
|
||
|
Text(L10n.Start.Btn.login)
|
||
|
}
|
||
|
.buttonStyle(SecondaryButtonStyle())
|
||
|
Button {
|
||
|
// state.flow = .registration
|
||
|
} label: {
|
||
|
Text(L10n.Start.Btn.register)
|
||
|
}
|
||
|
.buttonStyle(PrimaryButtonStyle())
|
||
|
}
|
||
|
}
|
||
|
.padding(.horizontal, 32)
|
||
|
}
|
||
|
}
|
||
|
}
|