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") .accessibilityLabel("location channels")
} }
.buttonStyle(.plain) .buttonStyle(.plain)
.padding(.leading, 8) .padding(.leading, 14)
.padding(.trailing, 8) .padding(.trailing, 8)
// Bookmark toggle (geochats): position after the #geohash badge with same spacing // 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 { private var secondaryTextColor: Color {
colorScheme == .dark ? Color.green.opacity(0.8) : Color(red: 0, green: 0.5, blue: 0).opacity(0.8) 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 { var body: some View {
VStack(spacing: 0) { VStack(spacing: 0) {
@@ -60,6 +64,7 @@ struct LocationNotesView: View {
Text("#\(geohash)") Text("#\(geohash)")
.font(.system(size: 16, weight: .bold, design: .monospaced)) .font(.system(size: 16, weight: .bold, design: .monospaced))
.foregroundColor(textColor) .foregroundColor(textColor)
.padding(.leading, 6)
} }
if let buildingName = locationManager.locationNames[.building], !buildingName.isEmpty { if let buildingName = locationManager.locationNames[.building], !buildingName.isEmpty {
Text(buildingName) Text(buildingName)
@@ -97,15 +102,15 @@ struct LocationNotesView: View {
HStack(spacing: 0) { HStack(spacing: 0) {
Text("@") Text("@")
.font(.system(size: 12, weight: .semibold, design: .monospaced)) .font(.system(size: 12, weight: .semibold, design: .monospaced))
.foregroundColor(secondaryTextColor) .foregroundColor(textColor)
let parts = splitSuffix(from: note.displayName) let parts = splitSuffix(from: note.displayName)
Text(parts.0) Text(parts.0)
.font(.system(size: 12, weight: .semibold, design: .monospaced)) .font(.system(size: 12, weight: .semibold, design: .monospaced))
.foregroundColor(secondaryTextColor) .foregroundColor(textColor)
if !parts.1.isEmpty { if !parts.1.isEmpty {
Text(parts.1) Text(parts.1)
.font(.system(size: 12, weight: .semibold, design: .monospaced)) .font(.system(size: 12, weight: .semibold, design: .monospaced))
.foregroundColor(textColor) .foregroundColor(darkerTextColor)
} }
} }
Text(timestampText(for: note.createdAt)) Text(timestampText(for: note.createdAt))