Move encryption status icons after peer names and implement slide-over navigation

- Moved encryption/handshake status icons to appear after peer names in sidebar and private message headers
- Converted private messages and channels to slide-over views with smooth transitions
- Added swipe-right gesture to dismiss private chats and channels
- Added vertical separator bars to slide-over views for visual consistency
This commit is contained in:
jack
2025-07-16 15:38:20 +02:00
parent 17e96e9993
commit ee2c7550d1
2 changed files with 515 additions and 372 deletions
+2 -2
View File
@@ -129,7 +129,7 @@ class ChatViewModel: ObservableObject {
}
// Show welcome message after delay if still no peers
DispatchQueue.main.asyncAfter(deadline: .now() + 3.0) { [weak self] in
DispatchQueue.main.asyncAfter(deadline: .now() + 5.0) { [weak self] in
guard let self = self else { return }
if self.connectedPeers.isEmpty && self.messages.isEmpty {
let welcomeMessage = BitchatMessage(
@@ -2107,7 +2107,6 @@ class ChatViewModel: ObservableObject {
}
} else {
// System message
let content = AttributedString("* \(message.content) *")
var contentStyle = AttributeContainer()
// Check for welcome message
if message.content.contains("get people around you to download bitchat") {
@@ -2115,6 +2114,7 @@ class ChatViewModel: ObservableObject {
} else {
contentStyle.foregroundColor = Color.gray
}
let content = AttributedString("* \(message.content) *")
contentStyle.font = .system(size: 12, design: .monospaced).italic()
result.append(content.mergingAttributes(contentStyle))
}