mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-20 21:07:55 +00:00
* plan: mcp-agent-profile * plan: mcp-agent-profile, answers Q1 (b) and Q2 (b) * plan: mcp-agent-profile, lists render on GitHub * mcp: User has the peer type of a person * ui: show the peer type placeholder of members and contacts * plan: mcp-agent-profile, answers to the user's notes * ui: compare link icons with peerTypeIcon in the desktop test * ui: snapshot references of the peer type placeholders * android: peer type placeholder of a caller on the lock screen * ios: agent icon of a link in the compose context at text size * plan: mcp-agent-profile, review fixes * ios: snapshot references with the compose context line of a link * core: send a change of the peer type alone to groups * mcp: User's peer type reaches existing session groups * plan: mcp-agent-profile, Q1 (a) * mcp: mark the agent profile item delivered in the roadmap
43 lines
1.3 KiB
Swift
43 lines
1.3 KiB
Swift
import SwiftUI
|
|
import SimpleXChat
|
|
|
|
struct ComposeChatLinkView: View {
|
|
@EnvironmentObject var theme: AppTheme
|
|
var chatLink: MsgChatLink
|
|
var cancelPreview: () -> Void
|
|
let cancelEnabled: Bool
|
|
|
|
var body: some View {
|
|
HStack(alignment: .center, spacing: 8) {
|
|
ProfileImage(
|
|
imageStr: chatLink.image,
|
|
icon: chatLink.icon,
|
|
size: 44
|
|
)
|
|
.padding(.leading, 12)
|
|
VStack(alignment: .leading, spacing: 2) {
|
|
Text(chatLink.displayName)
|
|
.font(.headline)
|
|
.lineLimit(1)
|
|
if let descr = chatLink.shortDescription {
|
|
Text(descr)
|
|
.font(.caption)
|
|
.foregroundColor(theme.colors.secondary)
|
|
.lineLimit(1)
|
|
}
|
|
}
|
|
.padding(.vertical, 5)
|
|
Spacer()
|
|
if cancelEnabled {
|
|
Button { cancelPreview() } label: {
|
|
Image(systemName: "multiply")
|
|
}
|
|
}
|
|
}
|
|
.padding(.vertical, 8)
|
|
.padding(.trailing, 12)
|
|
.background(theme.appColors.sentMessage)
|
|
.frame(maxWidth: .infinity)
|
|
}
|
|
}
|