Proyectos de Subversion Iphone Microlearning - Nuevo Interface

Rev

Rev 48 | Rev 50 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 48 Rev 49
Línea 77... Línea 77...
77
                .background(networkMonitor.status == .disconnected ? Color("color_network_disconnected_background") : Color("color_app_bar_background"))
77
                .background(networkMonitor.status == .disconnected ? Color("color_network_disconnected_background") : Color("color_app_bar_background"))
Línea 78... Línea 78...
78
        
78
        
Línea -... Línea 79...
-
 
79
        
-
 
80
                Divider().background(networkMonitor.status == .disconnected ? Color("color_network_disconnected_background") : Color("color_app_bar_background"))
-
 
81
                
-
 
82
 
-
 
83
                    
-
 
84
                HStack {
-
 
85
                        
-
 
86
                        if appData.userImage.isEmpty {
-
 
87
                             Image("logo")
-
 
88
                                .resizable()
-
 
89
                                .aspectRatio(contentMode: .fit)
-
 
90
                                .frame(height: Config.PROFILE_IMAGE_SIZE)
-
 
91
                                .clipShape(Circle())
-
 
92
                                .overlay(Circle().stroke(Color.white, lineWidth: 4))
-
 
93
                                .shadow(radius: 10)
-
 
94
                               
-
 
95
                               
-
 
96
                            
-
 
97
                        } else {
-
 
98
                            CustomAsyncImageProfile(
-
 
99
                                url: URL(string: appData.userImage)!,
-
 
100
                                placeholder: { Text(Config.LANG_COMMON_LOADING).font(.footnote).foregroundColor(.black)},
-
 
101
                                image: {
-
 
102
                                    Image(uiImage: $0)
-
 
103
                                        .resizable()
-
 
104
                                        
-
 
105
                                }
-
 
106
                            )
-
 
107
                        }
-
 
108
                }.padding(10)
-
 
109
              
-
 
110
                VStack(spacing: 5) {
-
 
111
                    VStack(spacing: 5) {
-
 
112
                        Text("\(appData.userFirstname) \(appData.userLastname)" )
-
 
113
                            .bold()
-
 
114
                            .font(.title)
-
 
115
                        Text("\(appData.userEmail)")
-
 
116
                            .font(.body)
-
 
117
                            .foregroundColor(Color("color_textview_foreground"))
-
 
118
                    }.padding()
-
 
119
 
79
        
120
     
80
                Divider().background(networkMonitor.status == .disconnected ? Color("color_network_disconnected_background") : Color("color_app_bar_background"))
121
                }.background(Color("color_card_view_background"))
Línea -... Línea 122...
-
 
122
                
-
 
123
                Text(Config.LANG_DELETE_ACCOUNT_MESSAGE)
-
 
124
                    .font(Font.custom(Config.FONT_NAME_REGULAR, size: Config.FONT_SIZE_DELETE_ACCOUNT_TEXT))
-
 
125
                
-
 
126
                HStack {
-
 
127
                    Text(Config.LANG_DELETE_ACCOUNT_FIELD_CODE_LABEL)
-
 
128
                    .font(Font.custom(Config  .FONT_NAME_REGULAR, size: 11))
-
 
129
                    .foregroundColor(Color("color_textview_foreground"))
-
 
130
                    Spacer()
81
                
131
                }
82
                Text(Config.LANG_DELETE_ACCOUNT_MESSAGE)
132
                .padding(.leading, 16)
Línea 83... Línea 133...
83
                    .font(Font.custom(Config.FONT_NAME_REGULAR, size: Config.FONT_SIZE_DELETE_ACCOUNT_TEXT))
133
                .padding(.top, 10)
84
                
134
                
Línea 94... Línea 144...
94
                .background(Color("color_textfield_background"))
144
                .background(Color("color_textfield_background"))
95
                .padding(.leading, 4)
145
                .padding(.leading, 4)
96
                .frame(width: UIScreen.main.bounds.width - 32, height: 35)
146
                .frame(width: UIScreen.main.bounds.width - 32, height: 35)
Línea 97... Línea 147...
97
 
147
 
-
 
148
                Button(action: {
98
                Button(action: {
149
                    sendCode();
99
                    
-
 
100
                    
150
                 
101
                }, label: {
151
                }, label: {
102
                    Text(Config.LANG_DELETE_ACCOUNT_BUTTON_SEND)
152
                    Text(Config.LANG_DELETE_ACCOUNT_BUTTON_SEND)
103
                     .font(Font.custom(Config.FONT_NAME_REGULAR, size: 13))
153
                    .font(Font.custom(Config.FONT_NAME_REGULAR, size: 13))
104
                     .frame(width: UIScreen.main.bounds.width - 32, height: 35)
154
                    .frame(width: UIScreen.main.bounds.width - 32, height: 35)
105
                        .foregroundColor(Color("color_button_foreground"))
155
                    .foregroundColor(Color("color_button_foreground"))
106
                        .background(Color("color_button_background"))
156
                    .background(Color("color_button_background"))
107
                        .border(Color("color_button_border"), width: Config.BUTTON_BORDER_SIZE)
157
                    .border(Color("color_button_border"), width: Config.BUTTON_BORDER_SIZE)
Línea 108... Línea 158...
108
                        .cornerRadius(Config.BUTTON_BORDER_RADIUS)
158
                    .cornerRadius(Config.BUTTON_BORDER_RADIUS)
109
                    
159
                    
110
                })
160
                })
111
                .padding(.top, 16)
161
                .padding(.top, 16)
Línea 112... Línea -...
112
                .padding(.leading, 16)
-
 
113
                .padding(.trailing, 16)
162
                .padding(.leading, 16)
114
                
-
 
Línea 115... Línea 163...
115
                Spacer()
163
                .padding(.trailing, 16)
116
                
-
 
117
                HStack {
-
 
-
 
164
                
118
                
165
 
119
                    Button(action: {
166
                
120
                        
167
                Button(action: {
-
 
168
                    getCode();
121
                        
169
                }, label: {
122
                    }, label: {
170
                    Text(Config.LANG_DELETE_ACCOUNT_BUTTON_REQUEST_CODE)
123
                        Text(Config.LANG_DELETE_ACCOUNT_BUTTON_REQUEST_CODE)
171
                    .font(Font.custom(Config.FONT_NAME_REGULAR, size: 13))
124
                            .font(Font.custom(Config.FONT_NAME_REGULAR, size: 13))
172
                    .frame(width: UIScreen.main.bounds.width - 32, height: 35)
-
 
173
                    .foregroundColor(Color("color_button_foreground"))
-
 
174
                    .background(Color("color_button_background"))
125
                            .foregroundColor(Color("color_button_foreground"))
175
                    .border(Color("color_button_border"), width: Config.BUTTON_BORDER_SIZE)
126
                            .background(Color("color_button_background"))
176
                    .cornerRadius(Config.BUTTON_BORDER_RADIUS)
Línea 127... Línea 177...
127
                            .border(Color("color_button_border"), width: Config.BUTTON_BORDER_SIZE)
177
                })
Línea 128... Línea 178...
128
                            .cornerRadius(Config.BUTTON_BORDER_RADIUS)
178
                .padding(.top, 16)
129
                            .padding(10)
-
 
130
                    })
-
 
131
                    
-
 
132
                    Spacer()
-
 
133
                    
-
 
134
                    Button(action: {
-
 
135
                        
-
 
136
                        
-
 
137
                    }, label: {
-
 
138
                        Text(Config.LANG_DELETE_ACCOUNT_BUTTON_CANCEL)
-
 
139
                            .font(Font.custom(Config.FONT_NAME_REGULAR, size: 13))
-
 
140
                            .foregroundColor(Color("color_button_foreground"))
-
 
Línea -... Línea 179...
-
 
179
                .padding(.leading, 16)
-
 
180
                .padding(.trailing, 16)
141
                            .background(Color("color_button_background"))
181
                    
142
                            .border(Color("color_button_border"), width: Config.BUTTON_BORDER_SIZE)
182
                Spacer()
143
                            .cornerRadius(Config.BUTTON_BORDER_RADIUS)
183
                    
-
 
184
                Button(action: {
-
 
185
                        
-
 
186
                    withAnimation {
-
 
187
                        appNavigation.subpageActive = .profile
-
 
188
                    }
-
 
189
                    
-
 
190
                }, label: {
144
                            .padding(10)
191
                    Text(Config.LANG_DELETE_ACCOUNT_BUTTON_CANCEL)
145
 
192
                    .font(Font.custom(Config.FONT_NAME_REGULAR, size: 13))
146
                           
193
                    .frame(width: UIScreen.main.bounds.width - 32, height: 35)
Línea 147... Línea 194...
147
                        
194
                    .foregroundColor(Color("color_button_foreground"))
Línea 164... Línea 211...
164
        
211
        
Línea 165... Línea 212...
165
    }
212
    }
166
    
213
    
-
 
214
    func sendCode() -> Void
-
 
215
    {
-
 
216
        if code.isEmpty || code.count != 8 {
-
 
217
            self.titleAlert = Config.LANG_ERROR_ACCOUNT_DELETE_CODE_IS_EMPTY_TITLE
-
 
218
            self.messageAlert = Config.LANG_ERROR_ACCOUNT_DELETE_CODE_IS_EMPTY_MESSAGE
-
 
219
            self.presentAlert = true
-
 
220
            return;
-
 
221
        }
-
 
222
        
167
    func sendCode() -> Void
223
        
168
    {
224
        
169
        let parameters = [
225
        let parameters = [