mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-14 06:57:51 +00:00
* ios: snapshot tests render all previews at fixed dates * ios: previews of your servers and terminal render without errors * ios: snapshots fill the screen height for lists, skip device migration * ios: snapshots show the sample user, secondary chat preview has items * ios: snapshots skip previews of live prices, profiles and console * ci: references of all iOS previews * ci: snapshot docs state window height, exclusions and timing * ios: snapshots skip previews with a blinking caret or a spinner * ios: snapshots end editing and stop animations, restoring 8 previews * ci: references of the restored cursor and spinner previews * ios: chat item previews clip items to bubbles as the chat view does * ci: references of chat item previews with bubbles
47 lines
1.3 KiB
Swift
47 lines
1.3 KiB
Swift
//
|
|
// MemberSupportChatToolbar.swift
|
|
// SimpleX (iOS)
|
|
//
|
|
// Created by spaced4ndy on 01.05.2025.
|
|
// Copyright © 2025 SimpleX Chat. All rights reserved.
|
|
//
|
|
|
|
import SwiftUI
|
|
import SimpleXChat
|
|
|
|
struct MemberSupportChatToolbar: View {
|
|
@Environment(\.colorScheme) var colorScheme
|
|
@EnvironmentObject var theme: AppTheme
|
|
var groupMember: GroupMember
|
|
var imageSize: CGFloat = 32
|
|
|
|
var body: some View {
|
|
return HStack {
|
|
MemberProfileImage(groupMember, size: imageSize)
|
|
.padding(.trailing, 4)
|
|
let t = Text(groupMember.chatViewName).font(.headline)
|
|
NameWithBadge((groupMember.verified ? memberVerifiedShield + t : t), groupMember.nameBadge, .headline)
|
|
.lineLimit(1)
|
|
}
|
|
.foregroundColor(theme.colors.onBackground)
|
|
.frame(width: 220)
|
|
}
|
|
|
|
private var memberVerifiedShield: Text {
|
|
(Text(Image(systemName: "checkmark.shield")) + textSpace)
|
|
.font(.caption)
|
|
.foregroundColor(theme.colors.secondary)
|
|
.baselineOffset(1)
|
|
.kerning(-2)
|
|
}
|
|
}
|
|
|
|
struct MemberSupportChatToolbar_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
MemberSupportChatToolbar(
|
|
groupMember: GroupMember.sampleData
|
|
)
|
|
.environmentObject(CurrentColors.toAppTheme())
|
|
}
|
|
}
|