Fix/visuals (#469)

* Geohash peers: show face.dashed for self when channel selected via teleport; face.smiling otherwise

* Geo presence: broadcast 'teleport' tag on geochat join; track teleported participants and show face.dashed for them in peer list

* Teleport tag: attach to actual geohash chat events (sendMessage, emotes, screenshots) instead of separate presence; remove presence emit

* Fix: show face.dashed for any teleported peer (not just self) in geohash list

* Geo list: show self immediately on channel switch and mark teleported state; clear teleported flags on leaving geochat

* Teleport persistence: recompute teleported based on current location vs selected geohash; add face.dashed icon to Teleport button label

* Styling: use lighter green/orange for #abcd suffix after nicknames in all chats (senders and @mentions)

* Peer lists: render #abcd suffix as lighter green/orange (self orange) in geohash and mesh lists

* Toolbar: move unread icon next to #channel badge and allow dynamic width; Peer lists: increase top spacing before first item

* Toolbar: prevent geohash channel badge from truncating; give it layout priority and fixed width

* Toolbar: make unread envelope independent from channel button (sits left of badge); fix accidental taps opening channel selector

* Toolbar: make unread envelope open most recent unread/private chat directly

* Geohash peer list: render self row fully orange (icon, base, suffix, '(you)')

---------

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
This commit is contained in:
jack
2025-08-21 11:15:18 +02:00
committed by GitHub
co-authored by jack
parent d3d9a22757
commit bc27e16899
7 changed files with 153 additions and 48 deletions
+18 -28
View File
@@ -834,16 +834,9 @@ struct ContentView: View {
Spacer()
// People counter with unread indicator
HStack(spacing: 4) {
if viewModel.hasAnyUnreadMessages {
Image(systemName: "envelope.fill")
.font(.system(size: 12))
.foregroundColor(Color.orange)
.accessibilityLabel("Unread private messages")
}
// People count depends on active channel
// Channel badge + dynamic spacing + people counter
HStack(spacing: 10) {
// Unread icon immediately to the left of the channel badge (independent from channel button)
#if os(iOS)
let cc = channelPeopleCountAndColor()
let otherPeersCount = cc.0
@@ -861,25 +854,30 @@ struct ContentView: View {
let countColor: Color = (peerCounts.mesh > 0) ? meshBlue : Color.secondary
#endif
// Location channels button '#'
// Unread indicator
#if os(iOS)
if viewModel.hasAnyUnreadMessages {
Button(action: { viewModel.openMostRelevantPrivateChat() }) {
Image(systemName: "envelope.fill")
.font(.system(size: 12))
.foregroundColor(Color.orange)
}
.buttonStyle(.plain)
.accessibilityLabel("Open unread private chat")
}
// Location channels button '#'
Button(action: { showLocationChannelsSheet = true }) {
#if os(iOS)
let badgeText: String = {
switch locationManager.selectedChannel {
case .mesh:
return "#mesh"
case .location(let ch):
return "#\(ch.geohash)"
case .mesh: return "#mesh"
case .location(let ch): return "#\(ch.geohash)"
}
}()
let badgeColor: Color = {
switch locationManager.selectedChannel {
case .mesh:
// Darker, more neutral blue (less purple hue)
return Color(hue: 0.60, saturation: 0.85, brightness: 0.82)
case .location:
// Standard green to avoid overly bright appearance in light mode
return (colorScheme == .dark) ? Color.green : Color(red: 0, green: 0.5, blue: 0)
}
}()
@@ -887,19 +885,11 @@ struct ContentView: View {
.font(.system(size: 14, design: .monospaced))
.foregroundColor(badgeColor)
.lineLimit(1)
.truncationMode(.head)
.frame(minWidth: 60, maxWidth: 160, alignment: .trailing)
.fixedSize(horizontal: false, vertical: false)
.fixedSize(horizontal: true, vertical: false)
.layoutPriority(2)
.accessibilityLabel("location channels")
#else
Text("#")
.font(.system(size: 14, design: .monospaced))
.foregroundColor(secondaryTextColor)
.accessibilityLabel("location channels")
#endif
}
.buttonStyle(.plain)
.padding(.trailing, 6)
#endif
HStack(spacing: 4) {