Proyectos de Subversion Iphone Microlearning - Inconcert

Rev

Rev 19 | | Comparar con el anterior | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
//
2
//  GoodByeView.swift
3
//  twogetskills
4
//
5
//  Created by Efrain Yanez Recanatini on 8/3/22.
6
//
7
 
8
import SwiftUI
9
 
10
struct GoodByeView: View {
11
 
12
    @EnvironmentObject var appNavigation : AppNavigation
21 efrain 13
    private var appData = Environment(\.appData).wrappedValue
1 efrain 14
 
15
    var body: some View {
16
 
17
            VStack(spacing: 0)
18
            {
19
 
20
                Group {
21
                    HStack {
22
                        Image("logo")
23
                            .resizable()
24
                            .aspectRatio(contentMode: .fit)
25
                            .frame(width: 42, height: 42, alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/)
26
 
27
                        Text(Config.LANG_SIGNIN_APP_NAME)
28
                            .font(Font.custom(Config.FONT_NAME_BOLD, size: 24))
19 efrain 29
                            .foregroundColor(Color("color_textview_foreground"))
1 efrain 30
 
31
                        Spacer()
32
                    }
33
                }
34
                .padding(.leading, 16)
35
                .padding(.top, 66)
36
 
37
                Spacer()
38
 
39
 
40
                LottieView(name: "good-bye2")
41
 
42
                    .frame(width: UIScreen.main.bounds.width / 1.5,
43
                           height: UIScreen.main.bounds.height / 3.2)
44
 
45
 
46
 
47
                Group {
48
 
49
                    VStack(spacing: 0)
50
                    {
51
 
52
                        Text(Config.LANG_GOODBYE_TITLE)
53
                            .font(Font.custom(Config.FONT_NAME_BOLD, size: 18))
54
                            .foregroundColor(Color("color_textview_foreground"))
55
 
56
 
57
                        Text(Config.LANG_GOODBYE_LABEL)
58
                            .font(Font.custom(Config.FONT_NAME_REGULAR, size: 16))
59
                            .foregroundColor(Color("color_textview_foreground"))
60
                            .padding(.horizontal, 16)
61
                            .padding(.top, 20)
62
                    }
63
 
64
                }.padding(.top, 30)
65
 
66
                Spacer()
67
 
68
 
69
 
70
                Button(action: {
71
 
72
                    DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
73
                            withAnimation {
74
                                appNavigation.pageActive = AppMainPage.intro1
75
                            }
76
                        }
77
 
78
                }, label: {
79
                    Text(Config.LANG_COMMON_NEXT)
80
                     .font(Font.custom(Config.FONT_NAME_REGULAR, size: 16))
81
                     .frame(width: UIScreen.main.bounds.width - 32, height: 35)
82
 
83
                        .foregroundColor(Color("color_button_dark_foreground"))
84
                        .background(Color("color_button_dark_background"))
85
                        .border(Color( "color_button_dark_border"), width: Config.BUTTON_BORDER_SIZE)
86
                        .cornerRadius(Config.BUTTON_BORDER_RADIUS)
87
 
88
                })
89
                .padding(.top, 16)
90
                .padding(.leading, 16)
91
                .padding(.trailing, 16)
92
 
93
 
94
                Spacer()
95
 
17 efrain 96
            }.onAppear {
97
                appData.userUuid = ""
98
                appData.userFirstname = ""
99
                appData.userLastname = ""
100
                appData.userEmail = ""
101
                appData.userImage = ""
102
                appData.refreshContentActionRequired = false
103
                appData.refreshContentMessage = ""
104
                appData.refreshContentMessageShowPending = false
105
                appData.signoutActionRequired = false
106
                appData.save()
107
            }
1 efrain 108
    }
109
}
110
 
111
 
112
 
113
struct GoodByeView_Previews: PreviewProvider {
114
    static var previews: some View {
115
        GoodByeView()
116
    }
117
}