ios 15
This commit is contained in:
parent
ec70d1f59d
commit
59d2f8c161
@ -244,104 +244,213 @@ struct PrivateChatView: View {
|
|||||||
|
|
||||||
let topPadding: CGFloat = decoratedMessage.showHorns ? 5 : -12
|
let topPadding: CGFloat = decoratedMessage.showHorns ? 5 : -12
|
||||||
let verticalPadding: CGFloat = hasDecorations ? 0 : 0
|
let verticalPadding: CGFloat = hasDecorations ? 0 : 0
|
||||||
|
|
||||||
return HStack(alignment: .bottom, spacing: 8) {
|
if #available(iOS 16.0, *) {
|
||||||
if isCurrentUser { Spacer(minLength: 32) }
|
return HStack(alignment: .bottom, spacing: 8) {
|
||||||
|
if isCurrentUser { Spacer(minLength: 32) }
|
||||||
messageBubble(
|
|
||||||
for: message,
|
messageBubble(
|
||||||
decorations: decoratedMessage,
|
for: message,
|
||||||
isCurrentUser: isCurrentUser
|
decorations: decoratedMessage,
|
||||||
)
|
isCurrentUser: isCurrentUser
|
||||||
|
)
|
||||||
if !isCurrentUser { Spacer(minLength: 32) }
|
|
||||||
}
|
if !isCurrentUser { Spacer(minLength: 32) }
|
||||||
.padding(.horizontal, 8)
|
}
|
||||||
.padding(.top, topPadding)
|
.padding(.horizontal, 8)
|
||||||
.padding(.vertical, verticalPadding)
|
.padding(.top, topPadding)
|
||||||
.contextMenu {
|
.padding(.vertical, verticalPadding)
|
||||||
if isCurrentUser {
|
.contextMenu(menuItems: {
|
||||||
if message.isViewed == true {
|
if isCurrentUser {
|
||||||
Text("Прочитано") // Placeholder for read status
|
if message.isViewed == true {
|
||||||
|
Text("Прочитано") // Placeholder for read status
|
||||||
|
}
|
||||||
|
Button(action: {
|
||||||
|
// Reply action
|
||||||
|
}) {
|
||||||
|
Text("Ответить")
|
||||||
|
Image(systemName: "arrowshape.turn.up.left")
|
||||||
|
}
|
||||||
|
Button(action: {
|
||||||
|
// Copy action
|
||||||
|
}) {
|
||||||
|
Text("Копировать")
|
||||||
|
Image(systemName: "doc.on.doc")
|
||||||
|
}
|
||||||
|
Button(action: {
|
||||||
|
// Edit action
|
||||||
|
}) {
|
||||||
|
Text("Изменить")
|
||||||
|
Image(systemName: "pencil")
|
||||||
|
}
|
||||||
|
Button(action: {
|
||||||
|
// Pin action
|
||||||
|
}) {
|
||||||
|
Text("Закрепить")
|
||||||
|
Image(systemName: "pin")
|
||||||
|
}
|
||||||
|
Button(action: {
|
||||||
|
// Forward action
|
||||||
|
}) {
|
||||||
|
Text("Переслать")
|
||||||
|
Image(systemName: "arrowshape.turn.up.right")
|
||||||
|
}
|
||||||
|
Button(role: .destructive, action: {
|
||||||
|
// Delete action
|
||||||
|
}) {
|
||||||
|
Text("Удалить")
|
||||||
|
Image(systemName: "trash")
|
||||||
|
}
|
||||||
|
Button(action: {
|
||||||
|
// Select action
|
||||||
|
}) {
|
||||||
|
Text("Выбрать")
|
||||||
|
Image(systemName: "checkmark.circle")
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
Button(action: {
|
||||||
|
// Reply action
|
||||||
|
}) {
|
||||||
|
Text("Ответить")
|
||||||
|
Image(systemName: "arrowshape.turn.up.left")
|
||||||
|
}
|
||||||
|
Button(action: {
|
||||||
|
// Copy action
|
||||||
|
}) {
|
||||||
|
Text("Копировать")
|
||||||
|
Image(systemName: "doc.on.doc")
|
||||||
|
}
|
||||||
|
Button(action: {
|
||||||
|
// Pin action
|
||||||
|
}) {
|
||||||
|
Text("Закрепить")
|
||||||
|
Image(systemName: "pin")
|
||||||
|
}
|
||||||
|
Button(action: {
|
||||||
|
// Forward action
|
||||||
|
}) {
|
||||||
|
Text("Переслать")
|
||||||
|
Image(systemName: "arrowshape.turn.up.right")
|
||||||
|
}
|
||||||
|
Button(role: .destructive, action: {
|
||||||
|
// Delete action
|
||||||
|
}) {
|
||||||
|
Text("Удалить")
|
||||||
|
Image(systemName: "trash")
|
||||||
|
}
|
||||||
|
Button(action: {
|
||||||
|
// Select action
|
||||||
|
}) {
|
||||||
|
Text("Выбрать")
|
||||||
|
Image(systemName: "checkmark.circle")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Button(action: {
|
}, preview: {
|
||||||
// Reply action
|
messageBubble(
|
||||||
}) {
|
for: message,
|
||||||
Text("Ответить")
|
decorations: decoratedMessage,
|
||||||
Image(systemName: "arrowshape.turn.up.left")
|
isCurrentUser: isCurrentUser
|
||||||
}
|
)
|
||||||
Button(action: {
|
})
|
||||||
// Copy action
|
} else {
|
||||||
}) {
|
return HStack(alignment: .bottom, spacing: 8) {
|
||||||
Text("Копировать")
|
if isCurrentUser { Spacer(minLength: 32) }
|
||||||
Image(systemName: "doc.on.doc")
|
|
||||||
}
|
messageBubble(
|
||||||
Button(action: {
|
for: message,
|
||||||
// Edit action
|
decorations: decoratedMessage,
|
||||||
}) {
|
isCurrentUser: isCurrentUser
|
||||||
Text("Изменить")
|
)
|
||||||
Image(systemName: "pencil")
|
|
||||||
}
|
if !isCurrentUser { Spacer(minLength: 32) }
|
||||||
Button(action: {
|
}
|
||||||
// Pin action
|
.padding(.horizontal, 8)
|
||||||
}) {
|
.padding(.top, topPadding)
|
||||||
Text("Закрепить")
|
.padding(.vertical, verticalPadding)
|
||||||
Image(systemName: "pin")
|
.contextMenu {
|
||||||
}
|
if isCurrentUser {
|
||||||
Button(action: {
|
if message.isViewed == true {
|
||||||
// Forward action
|
Text("Прочитано") // Placeholder for read status
|
||||||
}) {
|
}
|
||||||
Text("Переслать")
|
Button(action: {
|
||||||
Image(systemName: "arrowshape.turn.up.right")
|
// Reply action
|
||||||
}
|
}) {
|
||||||
Button(role: .destructive, action: {
|
Text("Ответить")
|
||||||
// Delete action
|
Image(systemName: "arrowshape.turn.up.left")
|
||||||
}) {
|
}
|
||||||
Text("Удалить")
|
Button(action: {
|
||||||
Image(systemName: "trash")
|
// Copy action
|
||||||
}
|
}) {
|
||||||
Button(action: {
|
Text("Копировать")
|
||||||
// Select action
|
Image(systemName: "doc.on.doc")
|
||||||
}) {
|
}
|
||||||
Text("Выбрать")
|
Button(action: {
|
||||||
Image(systemName: "checkmark.circle")
|
// Edit action
|
||||||
}
|
}) {
|
||||||
} else {
|
Text("Изменить")
|
||||||
Button(action: {
|
Image(systemName: "pencil")
|
||||||
// Reply action
|
}
|
||||||
}) {
|
Button(action: {
|
||||||
Text("Ответить")
|
// Pin action
|
||||||
Image(systemName: "arrowshape.turn.up.left")
|
}) {
|
||||||
}
|
Text("Закрепить")
|
||||||
Button(action: {
|
Image(systemName: "pin")
|
||||||
// Copy action
|
}
|
||||||
}) {
|
Button(action: {
|
||||||
Text("Копировать")
|
// Forward action
|
||||||
Image(systemName: "doc.on.doc")
|
}) {
|
||||||
}
|
Text("Переслать")
|
||||||
Button(action: {
|
Image(systemName: "arrowshape.turn.up.right")
|
||||||
// Pin action
|
}
|
||||||
}) {
|
Button(role: .destructive, action: {
|
||||||
Text("Закрепить")
|
// Delete action
|
||||||
Image(systemName: "pin")
|
}) {
|
||||||
}
|
Text("Удалить")
|
||||||
Button(action: {
|
Image(systemName: "trash")
|
||||||
// Forward action
|
}
|
||||||
}) {
|
Button(action: {
|
||||||
Text("Переслать")
|
// Select action
|
||||||
Image(systemName: "arrowshape.turn.up.right")
|
}) {
|
||||||
}
|
Text("Выбрать")
|
||||||
Button(role: .destructive, action: {
|
Image(systemName: "checkmark.circle")
|
||||||
// Delete action
|
}
|
||||||
}) {
|
} else {
|
||||||
Text("Удалить")
|
Button(action: {
|
||||||
Image(systemName: "trash")
|
// Reply action
|
||||||
}
|
}) {
|
||||||
Button(action: {
|
Text("Ответить")
|
||||||
// Select action
|
Image(systemName: "arrowshape.turn.up.left")
|
||||||
}) {
|
}
|
||||||
Text("Выбрать")
|
Button(action: {
|
||||||
Image(systemName: "checkmark.circle")
|
// Copy action
|
||||||
|
}) {
|
||||||
|
Text("Копировать")
|
||||||
|
Image(systemName: "doc.on.doc")
|
||||||
|
}
|
||||||
|
Button(action: {
|
||||||
|
// Pin action
|
||||||
|
}) {
|
||||||
|
Text("Закрепить")
|
||||||
|
Image(systemName: "pin")
|
||||||
|
}
|
||||||
|
Button(action: {
|
||||||
|
// Forward action
|
||||||
|
}) {
|
||||||
|
Text("Переслать")
|
||||||
|
Image(systemName: "arrowshape.turn.up.right")
|
||||||
|
}
|
||||||
|
Button(role: .destructive, action: {
|
||||||
|
// Delete action
|
||||||
|
}) {
|
||||||
|
Text("Удалить")
|
||||||
|
Image(systemName: "trash")
|
||||||
|
}
|
||||||
|
Button(action: {
|
||||||
|
// Select action
|
||||||
|
}) {
|
||||||
|
Text("Выбрать")
|
||||||
|
Image(systemName: "checkmark.circle")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user