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
+17 -4
View File
@@ -30,36 +30,49 @@ struct GeohashPeopleList: View {
}
return a.lastSeen > b.lastSeen
}
let firstID = ordered.first?.id
ForEach(ordered) { person in
HStack(spacing: 4) {
let convKey = "nostr_" + String(person.id.prefix(16))
if viewModel.unreadPrivateMessages.contains(convKey) {
Image(systemName: "envelope.fill").font(.system(size: 12)).foregroundColor(.orange)
} else {
Image(systemName: "person.fill").font(.system(size: 10)).foregroundColor(textColor)
// For the local user, use a different face icon when teleported
let isMe = (person.id == myHex)
#if os(iOS)
let teleported = isMe ? LocationChannelManager.shared.teleported : viewModel.teleportedGeo.contains(person.id.lowercased())
#else
let teleported = false
#endif
let icon = teleported ? "face.dashed" : "face.smiling"
let rowColor: Color = isMe ? .orange : textColor
Image(systemName: icon).font(.system(size: 12)).foregroundColor(rowColor)
}
let (base, suffix) = splitSuffix(from: person.displayName)
let isMe = person.id == myHex
HStack(spacing: 0) {
let rowColor: Color = isMe ? .orange : textColor
Text(base)
.font(.system(size: 14, design: .monospaced))
.fontWeight(isMe ? .bold : .regular)
.foregroundColor(textColor)
.foregroundColor(rowColor)
if !suffix.isEmpty {
let suffixColor = isMe ? Color.orange.opacity(0.6) : textColor.opacity(0.6)
Text(suffix)
.font(.system(size: 14, design: .monospaced))
.foregroundColor(Color.secondary.opacity(0.6))
.foregroundColor(suffixColor)
}
if isMe {
Text(" (you)")
.font(.system(size: 14, design: .monospaced))
.foregroundColor(textColor)
.foregroundColor(rowColor)
}
}
Spacer()
}
.padding(.horizontal)
.padding(.vertical, 4)
.padding(.top, person.id == firstID ? 10 : 0)
.contentShape(Rectangle())
.onTapGesture {
if person.id != myHex {