Rev 19 | AutorÃa | Comparar con el anterior | Ultima modificación | Ver Log |
//
// GoodByeView.swift
// twogetskills
//
// Created by Efrain Yanez Recanatini on 8/3/22.
//
import SwiftUI
struct GoodByeView: View {
@EnvironmentObject var appNavigation : AppNavigation
private var appData = Environment(\.appData).wrappedValue
var body: some View {
VStack(spacing: 0)
{
Group {
HStack {
Image("logo")
.resizable()
.aspectRatio(contentMode: .fit)
.frame(width: 42, height: 42, alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/)
Text(Config.LANG_SIGNIN_APP_NAME)
.font(Font.custom(Config.FONT_NAME_BOLD, size: 24))
.foregroundColor(Color("color_textview_foreground"))
Spacer()
}
}
.padding(.leading, 16)
.padding(.top, 66)
Spacer()
LottieView(name: "good-bye2")
.frame(width: UIScreen.main.bounds.width / 1.5,
height: UIScreen.main.bounds.height / 3.2)
Group {
VStack(spacing: 0)
{
Text(Config.LANG_GOODBYE_TITLE)
.font(Font.custom(Config.FONT_NAME_BOLD, size: 18))
.foregroundColor(Color("color_textview_foreground"))
Text(Config.LANG_GOODBYE_LABEL)
.font(Font.custom(Config.FONT_NAME_REGULAR, size: 16))
.foregroundColor(Color("color_textview_foreground"))
.padding(.horizontal, 16)
.padding(.top, 20)
}
}.padding(.top, 30)
Spacer()
Button(action: {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
withAnimation {
appNavigation.pageActive = AppMainPage.intro1
}
}
}, label: {
Text(Config.LANG_COMMON_NEXT)
.font(Font.custom(Config.FONT_NAME_REGULAR, size: 16))
.frame(width: UIScreen.main.bounds.width - 32, height: 35)
.foregroundColor(Color("color_button_dark_foreground"))
.background(Color("color_button_dark_background"))
.border(Color( "color_button_dark_border"), width: Config.BUTTON_BORDER_SIZE)
.cornerRadius(Config.BUTTON_BORDER_RADIUS)
})
.padding(.top, 16)
.padding(.leading, 16)
.padding(.trailing, 16)
Spacer()
}.onAppear {
appData.userUuid = ""
appData.userFirstname = ""
appData.userLastname = ""
appData.userEmail = ""
appData.userImage = ""
appData.refreshContentActionRequired = false
appData.refreshContentMessage = ""
appData.refreshContentMessageShowPending = false
appData.signoutActionRequired = false
appData.save()
}
}
}
struct GoodByeView_Previews: PreviewProvider {
static var previews: some View {
GoodByeView()
}
}