Location Notes: @name regular green, #abcd darker; nudge #hash\n\n- Render '@' and base name in regular green, suffix '#abcd' in darker green.\n- Add extra left padding before '#geohash' in notes header.\n- Increase leading padding for channel badge to push #mesh/#geohash further right.

This commit is contained in:
jack
2025-09-13 22:24:10 +02:00
parent a3f54c5bf8
commit bd753af6cb
2 changed files with 9 additions and 4 deletions
+1 -1
View File
@@ -1165,7 +1165,7 @@ struct ContentView: View {
.accessibilityLabel("location channels")
}
.buttonStyle(.plain)
.padding(.leading, 8)
.padding(.leading, 14)
.padding(.trailing, 8)
// Bookmark toggle (geochats): position after the #geohash badge with same spacing
+8 -3
View File
@@ -27,6 +27,10 @@ struct LocationNotesView: View {
private var secondaryTextColor: Color {
colorScheme == .dark ? Color.green.opacity(0.8) : Color(red: 0, green: 0.5, blue: 0).opacity(0.8)
}
// Slightly darker green for hash suffix emphasis
private var darkerTextColor: Color {
colorScheme == .dark ? Color.green : Color(red: 0, green: 0.4, blue: 0)
}
var body: some View {
VStack(spacing: 0) {
@@ -60,6 +64,7 @@ struct LocationNotesView: View {
Text("#\(geohash)")
.font(.system(size: 16, weight: .bold, design: .monospaced))
.foregroundColor(textColor)
.padding(.leading, 6)
}
if let buildingName = locationManager.locationNames[.building], !buildingName.isEmpty {
Text(buildingName)
@@ -97,15 +102,15 @@ struct LocationNotesView: View {
HStack(spacing: 0) {
Text("@")
.font(.system(size: 12, weight: .semibold, design: .monospaced))
.foregroundColor(secondaryTextColor)
.foregroundColor(textColor)
let parts = splitSuffix(from: note.displayName)
Text(parts.0)
.font(.system(size: 12, weight: .semibold, design: .monospaced))
.foregroundColor(secondaryTextColor)
.foregroundColor(textColor)
if !parts.1.isEmpty {
Text(parts.1)
.font(.system(size: 12, weight: .semibold, design: .monospaced))
.foregroundColor(textColor)
.foregroundColor(darkerTextColor)
}
}
Text(timestampText(for: note.createdAt))