Proyectos de Subversion Iphone Microlearning - Inconcert

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 17
Línea 8... Línea 8...
8
import SwiftUI
8
import SwiftUI
Línea 9... Línea 9...
9
 
9
 
Línea 10... Línea 10...
10
struct NotificationListItemView: View {
10
struct NotificationListItemView: View {
11
    
-
 
12
    var notification :  UserNotificationModel
11
    
13
    
-
 
14
 
-
 
15
    let onExecute: () -> Void
-
 
Línea 16... Línea 12...
16
    let onDelete: () -> Void
12
    var notification :  UserNotificationModel
17
    
13
  
Línea 33... Línea 29...
33
                        Spacer()
29
                        Spacer()
Línea 34... Línea 30...
34
                        
30
                        
Línea 35... Línea -...
35
                        
-
 
-
 
31
                        
36
                        if !notification.command.isEmpty && notification.viewed == 0 {
32
                        if !notification.command.isEmpty && notification.viewed == 0 {
37
                            
33
                            
38
                            Button(action:  onExecute, label: {
34
                      
39
                                Image(systemName: "arrowtriangle.right.fill")
35
                                Image(systemName: "arrowtriangle.right.fill")
40
                                    .resizable()
36
                                    .resizable()
41
                                    .aspectRatio(contentMode: /*@START_MENU_TOKEN@*/.fill/*@END_MENU_TOKEN@*/)
37
                                    .aspectRatio(contentMode: /*@START_MENU_TOKEN@*/.fill/*@END_MENU_TOKEN@*/)
Línea 42... Línea 38...
42
                                    .frame(width: 16, height: 16, alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/)
38
                                    .frame(width: 16, height: 16, alignment: /*@START_MENU_TOKEN@*/.center/*@END_MENU_TOKEN@*/)
Línea 43... Línea -...
43
                            }).padding(.trailing, 10)
-
 
-
 
39
                            .padding(.trailing, 10)
44
                            .foregroundColor(Color("color_capsule_list_item_title_foreground"))
40
                            .foregroundColor(Color("color_capsule_list_item_title_foreground"))
45
                            
41
                            
46
                        } else {
42
                        } else {
47
                        
43
                        
48
                        
44
                        
49
                            Button(action:  onDelete, label: {
45
                 
50
                                Image(systemName: "trash")
46
                                Image(systemName: "trash")
Línea 51... Línea 47...
51
                                    .resizable()
47
                                    .resizable()
52
                                    .aspectRatio(contentMode: /*@START_MENU_TOKEN@*/.fill/*@END_MENU_TOKEN@*/)
48
                                    .aspectRatio(contentMode: /*@START_MENU_TOKEN@*/.fill/*@END_MENU_TOKEN@*/)
Línea 103... Línea 99...
103
struct NotificationListItemView_Previews: PreviewProvider {
99
struct NotificationListItemView_Previews: PreviewProvider {
Línea 104... Línea 100...
104
    
100
    
Línea 105... Línea 101...
105
    static var  notification  = UserNotificationModel( userUuid: "U123", title: "Titulo Notification #1", body: "Description Notification #1", viewed: 0, url: "https://www.google.co.ve", dateOn: "2022-08-12", timeOn: "10:00:00")
101
    static var  notification  = UserNotificationModel( userUuid: "U123", title: "Titulo Notification #1", body: "Description Notification #1", viewed: 0, url: "https://www.google.co.ve", dateOn: "2022-08-12", timeOn: "10:00:00")
106
    
102
    
107
    static var previews: some View {
-
 
108
        NotificationListItemView(notification: notification,onExecute: {}) {
-
 
109
            
103
    static var previews: some View {
110
        }
104
        NotificationListItemView(notification: notification)