edit view contact list

This commit is contained in:
cheykrym 2025-10-23 23:22:52 +03:00
parent e6d7258b70
commit 910eef3703

View File

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