Proyectos de Subversion Iphone Microlearning - Nuevo Interface

Rev

Rev 8 | Ir a la última revisión | | Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 efrain 1
//
2
//  NotificationListView.swift
3
//  twogetskills
4
//
5
//  Created by Efrain Yanez Recanatini on 7/31/22.
6
//
7
 
8
import SwiftUI
9
 
10
struct NotificationListView: View {
11
    @EnvironmentObject var appNavigation : AppNavigation
12
 
13
    @ObservedObject var viewModel :NotificationListViewModel = NotificationListViewModel()
14
 
15
    private let appData : AppData = AppData.sharedInstance
16
 
17
    var body: some View {
18
        VStack(spacing: 0) {
19
            HStack {
20
                Image("logo")
21
                .resizable()
22
                .frame(width: 32, height: 32, alignment: .center)
23
                .aspectRatio(contentMode: .fit)
24
                .foregroundColor(Color("color_app_bar_foreground"))
25
                .padding(.leading, 16)
26
 
27
 
28
                Text(Config.LANG_TAB_BAR_BUTTON_NOTIFICATIONS)
29
                .font(Font.custom(Config.FONT_NAME_REGULAR, size: Config.FONT_SIZE_APP_BAR_HEAD1 ))
30
                .foregroundColor(Color("color_app_bar_foreground"))
31
                .padding(.leading, 4)
32
 
33
                Spacer()
34
 
35
 
36
            }
37
            .background(Color("color_app_bar_background"))
38
            .edgesIgnoringSafeArea(.top)
39
            .frame(height: 50)
40
            Divider()
41
 
42
            ScrollView {
43
                LazyVStack  {
44
                    ForEach(0..<self.viewModel.notifications.count) { index in
45
 
46
                        VStack(spacing: 0) {
47
                           HStack {
48
                                Spacer()
49
                                            Text("No hay notificaciones")
50
                                                .font(Font.custom(Config.FONT_NAME_BOLD, size: 14))
51
                                                .foregroundColor(Color("color_capsule_list_item_title_foreground"))
52
 
53
                                    Spacer()
54
 
55
 
56
                             }
57
 
58
                        Divider()
59
                        } .background(Color("color_capsule_list_item_background"))
60
                        .padding(.leading, 5)
61
                        .padding(.trailing, 5)
62
 
63
 
64
                    /*
65
                        CompanyListItemView(companyUuid: self.viewModel.companies[index].uuid)
66
 
67
                    */
68
                    }
69
 
70
                }
71
            }
72
 
73
        }
74
    }
75
}
76
 
77
struct NotificationListView_Previews: PreviewProvider {
78
    static var previews: some View {
79
        NotificationListView()
80
    }
81
}