mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user