mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-25 02:25:20 +00:00
Update terminology to be more human-friendly
- Change 'nick:' to 'name:' in the UI - Replace 'peer/peers' with 'person/people' throughout - Update 'No peers connected' to 'No people connected' - Fix menu layout with fixedSize() - Update debug messages to use 'people' instead of 'peers'
This commit is contained in:
@@ -143,7 +143,7 @@ class BluetoothMeshService: NSObject {
|
|||||||
print("[DEBUG] Cannot scan - central not powered on")
|
print("[DEBUG] Cannot scan - central not powered on")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
print("[DEBUG] Starting scan for peers...")
|
print("[DEBUG] Starting scan for people...")
|
||||||
centralManager.scanForPeripherals(withServices: [BluetoothMeshService.serviceUUID], options: [CBCentralManagerScanOptionAllowDuplicatesKey: false])
|
centralManager.scanForPeripherals(withServices: [BluetoothMeshService.serviceUUID], options: [CBCentralManagerScanOptionAllowDuplicatesKey: false])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ struct ContentView: View {
|
|||||||
Spacer()
|
Spacer()
|
||||||
|
|
||||||
HStack(spacing: 4) {
|
HStack(spacing: 4) {
|
||||||
Text("nick:")
|
Text("name:")
|
||||||
.font(.system(size: 11, design: .monospaced))
|
.font(.system(size: 11, design: .monospaced))
|
||||||
.foregroundColor(secondaryTextColor)
|
.foregroundColor(secondaryTextColor)
|
||||||
|
|
||||||
@@ -144,13 +144,13 @@ struct ContentView: View {
|
|||||||
private var peerStatusView: some View {
|
private var peerStatusView: some View {
|
||||||
Menu {
|
Menu {
|
||||||
if viewModel.connectedPeers.isEmpty {
|
if viewModel.connectedPeers.isEmpty {
|
||||||
Text("No peers connected")
|
Text("No people connected")
|
||||||
.font(.system(size: 12, design: .monospaced))
|
.font(.system(size: 12, design: .monospaced))
|
||||||
} else {
|
} else {
|
||||||
let peerNicknames = viewModel.meshService.getPeerNicknames()
|
let peerNicknames = viewModel.meshService.getPeerNicknames()
|
||||||
let myPeerID = viewModel.meshService.myPeerID
|
let myPeerID = viewModel.meshService.myPeerID
|
||||||
ForEach(viewModel.connectedPeers.filter { $0 != myPeerID }.sorted(), id: \.self) { peerID in
|
ForEach(viewModel.connectedPeers.filter { $0 != myPeerID }.sorted(), id: \.self) { peerID in
|
||||||
let displayName = peerNicknames[peerID] ?? "peer-\(peerID.prefix(4))"
|
let displayName = peerNicknames[peerID] ?? "person-\(peerID.prefix(4))"
|
||||||
Button(action: {
|
Button(action: {
|
||||||
// Only allow private chat if peer has announced
|
// Only allow private chat if peer has announced
|
||||||
if peerNicknames[peerID] != nil {
|
if peerNicknames[peerID] != nil {
|
||||||
@@ -183,7 +183,7 @@ struct ContentView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Text
|
// Text
|
||||||
Text(viewModel.isConnected ? "\(viewModel.connectedPeers.count) \(viewModel.connectedPeers.count == 1 ? "peer" : "peers")" : "scanning")
|
Text(viewModel.isConnected ? "\(viewModel.connectedPeers.count) \(viewModel.connectedPeers.count == 1 ? "person" : "people")" : "scanning")
|
||||||
.font(.system(size: 14, design: .monospaced))
|
.font(.system(size: 14, design: .monospaced))
|
||||||
.foregroundColor(viewModel.isConnected ? textColor : Color.red)
|
.foregroundColor(viewModel.isConnected ? textColor : Color.red)
|
||||||
|
|
||||||
@@ -195,6 +195,7 @@ struct ContentView: View {
|
|||||||
}
|
}
|
||||||
.menuStyle(.borderlessButton)
|
.menuStyle(.borderlessButton)
|
||||||
.menuIndicator(.hidden)
|
.menuIndicator(.hidden)
|
||||||
|
.fixedSize()
|
||||||
}
|
}
|
||||||
|
|
||||||
private var messagesView: some View {
|
private var messagesView: some View {
|
||||||
|
|||||||
Reference in New Issue
Block a user