edit view contact list
This commit is contained in:
		
							parent
							
								
									e6d7258b70
								
							
						
					
					
						commit
						910eef3703
					
				@ -29,7 +29,7 @@ struct ContactsTab: View {
 | 
			
		||||
                            .contentShape(Rectangle())
 | 
			
		||||
                    }
 | 
			
		||||
                    .buttonStyle(.plain)
 | 
			
		||||
                    .listRowInsets(EdgeInsets(top: 8, leading: 16, bottom: 8, trailing: 16))
 | 
			
		||||
                    .listRowInsets(EdgeInsets(top: 0, leading: 12, bottom: 0, trailing: 12))
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
@ -66,8 +66,8 @@ struct ContactsTab: View {
 | 
			
		||||
                .progressViewStyle(CircularProgressViewStyle())
 | 
			
		||||
            Spacer()
 | 
			
		||||
        }
 | 
			
		||||
        .padding(.vertical, 24)
 | 
			
		||||
        .listRowInsets(EdgeInsets(top: 24, leading: 16, bottom: 24, trailing: 16))
 | 
			
		||||
        .padding(.vertical, 18)
 | 
			
		||||
        .listRowInsets(EdgeInsets(top: 18, leading: 12, bottom: 18, trailing: 12))
 | 
			
		||||
        .listRowSeparator(.hidden)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -84,8 +84,8 @@ struct ContactsTab: View {
 | 
			
		||||
                    .font(.subheadline)
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        .padding(.vertical, 12)
 | 
			
		||||
        .listRowInsets(EdgeInsets(top: 12, leading: 16, bottom: 12, trailing: 16))
 | 
			
		||||
        .padding(.vertical, 10)
 | 
			
		||||
        .listRowInsets(EdgeInsets(top: 10, leading: 12, bottom: 10, trailing: 12))
 | 
			
		||||
        .listRowSeparator(.hidden)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -103,8 +103,8 @@ struct ContactsTab: View {
 | 
			
		||||
                .multilineTextAlignment(.center)
 | 
			
		||||
        }
 | 
			
		||||
        .frame(maxWidth: .infinity)
 | 
			
		||||
        .padding(.vertical, 36)
 | 
			
		||||
        .listRowInsets(EdgeInsets(top: 24, leading: 16, bottom: 24, trailing: 16))
 | 
			
		||||
        .padding(.vertical, 28)
 | 
			
		||||
        .listRowInsets(EdgeInsets(top: 20, leading: 12, bottom: 20, trailing: 12))
 | 
			
		||||
        .listRowSeparator(.hidden)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@ -134,30 +134,30 @@ private struct ContactRow: View {
 | 
			
		||||
    let contact: Contact
 | 
			
		||||
 | 
			
		||||
    var body: some View {
 | 
			
		||||
        HStack(alignment: .top, spacing: 12) {
 | 
			
		||||
        HStack(alignment: .top, spacing: 10) {
 | 
			
		||||
            Circle()
 | 
			
		||||
                .fill(Color.accentColor.opacity(0.15))
 | 
			
		||||
                .frame(width: 44, height: 44)
 | 
			
		||||
                .frame(width: 40, height: 40)
 | 
			
		||||
                .overlay(
 | 
			
		||||
                    Text(contact.initials)
 | 
			
		||||
                        .font(.headline)
 | 
			
		||||
                        .foregroundColor(.accentColor)
 | 
			
		||||
                )
 | 
			
		||||
 | 
			
		||||
            VStack(alignment: .leading, spacing: 4) {
 | 
			
		||||
            VStack(alignment: .leading, spacing: 3) {
 | 
			
		||||
                HStack(alignment: .firstTextBaseline) {
 | 
			
		||||
                    Text(contact.displayName)
 | 
			
		||||
                        .font(.body.weight(.semibold))
 | 
			
		||||
                        .font(.subheadline.weight(.semibold))
 | 
			
		||||
                        .foregroundColor(.primary)
 | 
			
		||||
                    Spacer()
 | 
			
		||||
                    Text(contact.formattedCreatedAt)
 | 
			
		||||
                        .font(.caption)
 | 
			
		||||
                        .font(.caption2)
 | 
			
		||||
                        .foregroundColor(.secondary)
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
                if let handle = contact.handle {
 | 
			
		||||
                    Text(handle)
 | 
			
		||||
                        .font(.caption)
 | 
			
		||||
                        .font(.caption2)
 | 
			
		||||
                        .foregroundColor(.secondary)
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
@ -167,15 +167,15 @@ private struct ContactRow: View {
 | 
			
		||||
            }
 | 
			
		||||
            .frame(maxWidth: .infinity, alignment: .leading)
 | 
			
		||||
        }
 | 
			
		||||
        .padding(.vertical, 8)
 | 
			
		||||
        .padding(.vertical, 6)
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    private var friendCodeBadge: some View {
 | 
			
		||||
        Text(NSLocalizedString("Код дружбы", comment: "Friend code badge"))
 | 
			
		||||
            .font(.caption2.weight(.semibold))
 | 
			
		||||
            .font(.caption2.weight(.medium))
 | 
			
		||||
            .foregroundColor(Color.accentColor)
 | 
			
		||||
            .padding(.horizontal, 8)
 | 
			
		||||
            .padding(.vertical, 4)
 | 
			
		||||
            .padding(.horizontal, 6)
 | 
			
		||||
            .padding(.vertical, 3)
 | 
			
		||||
            .background(Color.accentColor.opacity(0.12))
 | 
			
		||||
            .clipShape(Capsule())
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user