Proyectos de Subversion Iphone Microlearning - Nuevo Interface

Rev

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

Rev 1 Rev 8
Línea 11... Línea 11...
11
 
11
 
Línea -... Línea 12...
-
 
12
 
-
 
13
 
12
 
14
struct MyCapsulesView: View {
13
 
15
 
14
struct MyCapsulesView: View {
16
    @EnvironmentObject private var networkMonitor : NetworkMonitor
15
 
17
    
Línea 23... Línea 25...
23
    @StateObject private var listingViewModel : MyCapsulesListingViewModel = MyCapsulesListingViewModel()
25
    @StateObject private var listingViewModel : MyCapsulesListingViewModel = MyCapsulesListingViewModel()
Línea 24... Línea 26...
24
    
26
    
Línea -... Línea 27...
-
 
27
    @StateObject private var inprogressViewModel : MyCapsulesInProgressViewModel = MyCapsulesInProgressViewModel()
25
    @StateObject private var inprogressViewModel : MyCapsulesInProgressViewModel = MyCapsulesInProgressViewModel()
28
    
26
    
29
    
Línea 27... Línea 30...
27
    
30
    
28
    private let firstName : String
31
    private let firstName : String
Línea 43... Línea 46...
43
    
46
    
Línea 44... Línea 47...
44
    var body: some View {
47
    var body: some View {
45
 
48
 
-
 
49
        VStack(spacing: 0) {
-
 
50
            HStack {
46
        VStack(spacing: 0) {
51
                
47
            HStack {
52
                
48
                Image("logo")
53
                Image("logo")
49
                .resizable()
54
                .resizable()
50
                .frame(width: 32, height: 32, alignment: .center)
55
                .frame(width: 32, height: 32, alignment: .center)
51
                .aspectRatio(contentMode: .fit)
56
                .aspectRatio(contentMode: .fit)
Línea 52... Línea 57...
52
                .foregroundColor(Color("color_app_bar_foreground"))
57
                    .foregroundColor(networkMonitor.status == .disconnected ? Color("color_network_disconnected_foreground") : Color("color_app_bar_foreground"))
53
                .padding(.leading, 16)
58
                .padding(.leading, 16)
54
             
59
             
55
                
60
                
Línea 56... Línea 61...
56
                Text(Config.LANG_TAB_BAR_BUTTON_TOPICS)
61
                Text(networkMonitor.status == .disconnected ? Config.LANG_ERROR_NETWORK_MESSAGE_SHORT : Config.LANG_TAB_BAR_BUTTON_MY_CAPSULES)
Línea 57... Línea 62...
57
                .font(Font.custom(Config.FONT_NAME_REGULAR, size: Config.FONT_SIZE_APP_BAR_HEAD1 ))
62
                .font(Font.custom(Config.FONT_NAME_REGULAR, size: Config.FONT_SIZE_APP_BAR_HEAD1 ))
58
                .foregroundColor(Color("color_app_bar_foreground"))
-
 
59
                .padding(.leading, 4)
63
                    .foregroundColor(networkMonitor.status == .disconnected ? Color("color_network_disconnected_foreground") : Color("color_app_bar_foreground"))
60
                
64
                .padding(.leading, 4)
-
 
65
                
61
                Spacer()
66
                Spacer()
62
                
67
                
Línea 63... Línea 68...
63
            }
68
            }
Línea 64... Línea 69...
64
            .background(Color("color_app_bar_background"))
69
            .edgesIgnoringSafeArea(.top)
Línea 157... Línea 162...
157
                    }
162
                    }
Línea 158... Línea 163...
158
                    
163
                    
Línea -... Línea 164...
-
 
164
                       
-
 
165
                }
-
 
166
                
-
 
167
            }.onAppear {
-
 
168
               
-
 
169
                
159
                       
170
                self.listingViewModel.fetch()
Línea 160... Línea 171...
160
                }
171
                self.inprogressViewModel.fetch()