Proyectos de Subversion Iphone Microlearning

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
//
2
//  IntroView.swift
3
//  twogetskills
4
//
5
//  Created by Efrain Yanez Recanatini on 1/26/22.
6
//
7
 
8
import SwiftUI
9
 
10
struct IntroView: View {
11
 
12
    @Environment(\.openURL) var openURL
13
 
14
    private let colorTitle = UIColor(hex: Config.COLOR_TEXT_VIEW_TITLE)
15
 
16
    private let colorButtonIntroBackground = UIColor(hex: Config.COLOR_BUTTON_INTRO_BACKGROUND)
17
 
18
    private let colorButtonText = UIColor(hex: Config.COLOR_PRIMARY_DARK)
19
 
20
    private let colorWindowBackground = UIColor(hex: Config.COLOR_WINDOW_BACKGROUND)
21
 
22
    private let colorAppBar = UIColor(hex: Config.COLOR_APP_BAR)
23
 
24
 
25
 
26
 
27
    @State private var goToLogin : Bool = false
28
 
29
 
30
 
31
    var body: some View {
32
        VStack() {
33
            Spacer(minLength: 10)
34
 
35
            Text("¡Tómate tu tiempo para aprender!")
36
                .font(.title3)
37
                .foregroundColor(Color(colorTitle ?? .gray))
38
 
39
            Text("Comunicar fácilmente")
40
                .font(.subheadline)
41
                .foregroundColor(Color(colorTitle ?? .systemBlue))
42
                .padding(5)
43
 
44
            NavigationLink(
45
                destination: LoginView(),
46
                isActive: self.$goToLogin,
47
                label: {
48
                    Text("")
49
                }
50
            )
51
 
52
            Button(action: {
53
                self.goToLogin = true
54
            }, label: {
55
                Text("Empezar")
56
                    .frame(width: 200)
57
                    .font(.callout)
58
                    .padding(.vertical, 8.0)
59
                    .foregroundColor(.white)
60
                    .background(Color(colorButtonIntroBackground ?? .blue))
61
                    .cornerRadius(10)
62
            })
63
            Spacer(minLength: 10)
64
 
65
            Button(action: {
66
                openURL(URL(string: "https://leaderslinked.com/signup")!)
67
            }, label: {
68
                Text("¿Ya tienes una cuenta? Registrarse")
69
                    .font(.caption)
70
                    .foregroundColor(Color(colorTitle ?? .white))
71
            }).padding()
72
 
73
            HStack() {
74
                Spacer()
75
            }
76
       }
77
       .edgesIgnoringSafeArea(/*@START_MENU_TOKEN@*/.all/*@END_MENU_TOKEN@*/)
78
       .background(Color(colorWindowBackground ?? .gray))
79
       .navigationBarHidden(true)
80
       .navigationBarBackButtonHidden(true)
81
    }
82
}
83
 
84
struct IntroView_Previews: PreviewProvider {
85
    static var previews: some View {
86
        IntroView()
87
    }
88
}
89
 
90