Adopt the new start chat button design. (#4013)

* Update compound and handle plain to tertiary/textLink button style updates.

* Update the start chat button to use the right icon/style.

* Update preview snapshots.

* Fix remaining snapshots.
This commit is contained in:
Doug
2025-04-11 17:09:57 +01:00
committed by GitHub
parent 511c4d7bf7
commit a5d94a0219
176 changed files with 385 additions and 363 deletions
@@ -38,7 +38,7 @@ struct KnockRequestCell: View {
contentID: cellInfo.userID,
avatarSize: .user(on: .knockingUserList),
mediaProvider: mediaProvider)
VStack(alignment: .leading, spacing: 12) {
VStack(alignment: .leading, spacing: 16) {
header
if let reason = cellInfo.reason {
DisclosableText(text: reason)
@@ -80,23 +80,30 @@ struct KnockRequestCell: View {
@ViewBuilder
private var actions: some View {
VStack(spacing: 0) {
VStack(spacing: 16) {
if onDecline != nil || onAccept != nil {
HStack(spacing: 16) {
if let onDecline {
Button(L10n.actionDecline) {
Button {
onDecline(cellInfo.eventID)
} label: {
Text(L10n.actionDecline)
.frame(maxWidth: .infinity)
}
.buttonStyle(.compound(.secondary, size: .medium))
}
if let onAccept {
Button(L10n.actionAccept) {
Button {
onAccept(cellInfo.eventID)
} label: {
Text(L10n.actionAccept)
.frame(maxWidth: .infinity)
}
.buttonStyle(.compound(.primary, size: .medium))
}
}
.fixedSize(horizontal: false, vertical: true)
}
if let onDeclineAndBan {
@@ -104,12 +111,10 @@ struct KnockRequestCell: View {
onDeclineAndBan(cellInfo.eventID)
} label: {
Text(L10n.screenKnockRequestsListDeclineAndBanActionTitle)
.padding(.top, 8)
.padding(.bottom, 4)
.frame(maxWidth: .infinity)
}
.frame(maxWidth: .infinity)
.buttonStyle(.compound(.plain))
.padding(.top, 16)
.buttonStyle(.compound(.tertiary, size: .small))
.padding(.top, 4)
}
}
.padding(.bottom, 16)