Proyectos de Subversion Iphone Microlearning - Inconcert

Rev

Rev 1 | Rev 19 | Ir a la última revisión | | 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
17 efrain 13
    private var  appData = AppData.sharedInstance
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))
29
 
30
                        Spacer()
31
                    }
32
                }
33
                .padding(.leading, 16)
34
                .padding(.top, 66)
35
 
36
                Spacer()
37
 
38
 
39
                LottieView(name: "good-bye2")
40
 
41
                    .frame(width: UIScreen.main.bounds.width / 1.5,
42
                           height: UIScreen.main.bounds.height / 3.2)
43
 
44
 
45
 
46
                Group {
47
 
48
                    VStack(spacing: 0)
49
                    {
50
 
51
                        Text(Config.LANG_GOODBYE_TITLE)
52
                            .font(Font.custom(Config.FONT_NAME_BOLD, size: 18))
53
                            .foregroundColor(Color("color_textview_foreground"))
54
 
55
 
56
                        Text(Config.LANG_GOODBYE_LABEL)
57
                            .font(Font.custom(Config.FONT_NAME_REGULAR, size: 16))
58
                            .foregroundColor(Color("color_textview_foreground"))
59
                            .padding(.horizontal, 16)
60
                            .padding(.top, 20)
61
                    }
62
 
63
                }.padding(.top, 30)
64
 
65
                Spacer()
66
 
67
 
68
 
69
                Button(action: {
70
 
71
                    DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
72
                            withAnimation {
73
                                appNavigation.pageActive = AppMainPage.intro1
74
                            }
75
                        }
76
 
77
                }, label: {
78
                    Text(Config.LANG_COMMON_NEXT)
79
                     .font(Font.custom(Config.FONT_NAME_REGULAR, size: 16))
80
                     .frame(width: UIScreen.main.bounds.width - 32, height: 35)
81
 
82
                        .foregroundColor(Color("color_button_dark_foreground"))
83
                        .background(Color("color_button_dark_background"))
84
                        .border(Color( "color_button_dark_border"), width: Config.BUTTON_BORDER_SIZE)
85
                        .cornerRadius(Config.BUTTON_BORDER_RADIUS)
86
 
87
                })
88
                .padding(.top, 16)
89
                .padding(.leading, 16)
90
                .padding(.trailing, 16)
91
 
92
 
93
                Spacer()
94
 
17 efrain 95
            }.onAppear {
96
                appData.userUuid = ""
97
                appData.userFirstname = ""
98
                appData.userLastname = ""
99
                appData.userEmail = ""
100
                appData.userImage = ""
101
                appData.refreshContentActionRequired = false
102
                appData.refreshContentMessage = ""
103
                appData.refreshContentMessageShowPending = false
104
                appData.signoutActionRequired = false
105
                appData.save()
106
            }
1 efrain 107
    }
108
}
109
 
110
 
111
 
112
struct GoodByeView_Previews: PreviewProvider {
113
    static var previews: some View {
114
        GoodByeView()
115
    }
116
}