mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-07-18 07:16:19 +00:00
style in progress
This commit is contained in:
@@ -732,7 +732,7 @@ struct ChatView: View {
|
||||
}
|
||||
return Group {
|
||||
if case .chatBanner = ci.content {
|
||||
chatBannerView()
|
||||
ChatBannerView(chat: chat)
|
||||
} else {
|
||||
let voiceNoFrame = voiceWithoutFrame(ci)
|
||||
let maxWidth = cInfo.chatType == .group
|
||||
@@ -810,26 +810,49 @@ struct ChatView: View {
|
||||
}
|
||||
}
|
||||
|
||||
private func chatBannerView() -> some View {
|
||||
VStack {
|
||||
Spacer().frame(height: 60)
|
||||
struct ChatBannerView: View {
|
||||
@Environment(\.dynamicTypeSize) private var userFont: DynamicTypeSize
|
||||
@ObservedObject var chat: Chat
|
||||
|
||||
ChatInfoImage(chat: chat, size: 103, backgroundColor: theme.colors.background)
|
||||
Text(chat.chatInfo.chatViewName)
|
||||
.font(.title3)
|
||||
.multilineTextAlignment(.center)
|
||||
.lineLimit(2)
|
||||
let fullName = chat.chatInfo.fullName.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
if fullName != "" && fullName != chat.chatInfo.chatViewName && fullName != chat.chatInfo.chatViewName.trimmingCharacters(in: .whitespacesAndNewlines) {
|
||||
Text(chat.chatInfo.fullName)
|
||||
.font(.headline)
|
||||
.multilineTextAlignment(.center)
|
||||
.lineLimit(3)
|
||||
var body: some View {
|
||||
VStack {
|
||||
Spacer().frame(height: 60)
|
||||
|
||||
VStack(spacing: 8) {
|
||||
ChatInfoImage(chat: chat, size: dynamicSize(userFont).profileImageSize)
|
||||
Text(chat.chatInfo.displayName)
|
||||
.font(.title3)
|
||||
.multilineTextAlignment(.center)
|
||||
.lineLimit(2)
|
||||
.frame(maxWidth: 240)
|
||||
let fullName = chat.chatInfo.fullName.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||
if fullName != "" && fullName != chat.chatInfo.displayName && fullName != chat.chatInfo.displayName.trimmingCharacters(in: .whitespacesAndNewlines) {
|
||||
Text(chat.chatInfo.fullName)
|
||||
.font(.headline)
|
||||
.fontWeight(.regular)
|
||||
.multilineTextAlignment(.center)
|
||||
.lineLimit(2)
|
||||
.frame(maxWidth: 260)
|
||||
}
|
||||
if let shortDescr = chat.chatInfo.shortDescr {
|
||||
Text(shortDescr)
|
||||
.font(.subheadline)
|
||||
.multilineTextAlignment(.center)
|
||||
.lineLimit(3)
|
||||
.padding(.horizontal)
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding()
|
||||
.background(
|
||||
RoundedRectangle(cornerRadius: 18)
|
||||
.fill(Color(uiColor: .tertiarySystemGroupedBackground))
|
||||
)
|
||||
.padding(.horizontal)
|
||||
|
||||
Spacer().frame(height: 60)
|
||||
}
|
||||
|
||||
Spacer().frame(height: 60)
|
||||
}
|
||||
.frame(maxWidth: 160)
|
||||
}
|
||||
|
||||
private var connectingText: LocalizedStringKey? {
|
||||
|
||||
Reference in New Issue
Block a user