mirror of
https://github.com/permissionlesstech/bitchat.git
synced 2026-07-24 23:45:18 +00:00
Add block command to autocomplete, app info modal, and README
This commit is contained in:
@@ -66,6 +66,9 @@ This project is released into the public domain. See the [LICENSE](LICENSE) file
|
||||
- `/m @user message` - Send a private message
|
||||
- `/w` - List online users
|
||||
- `/channels` - Show all discovered channels
|
||||
- `/block @user` - Block a user from messaging you
|
||||
- `/block` - List all blocked users
|
||||
- `/unblock @user` - Unblock a user
|
||||
- `/clear` - Clear chat messages
|
||||
- `/pass [password]` - Set/change channel password (owner only)
|
||||
- `/transfer @user` - Transfer channel ownership
|
||||
|
||||
@@ -102,6 +102,26 @@ struct AppInfoView: View {
|
||||
.foregroundColor(textColor)
|
||||
}
|
||||
|
||||
// Commands
|
||||
VStack(alignment: .leading, spacing: 16) {
|
||||
SectionHeader("Commands")
|
||||
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
Text("/j #channel - join or create a channel")
|
||||
Text("/m @user - send private message")
|
||||
Text("/w - see who's online")
|
||||
Text("/channels - show all discovered channels")
|
||||
Text("/block @user - block a user")
|
||||
Text("/block - list blocked users")
|
||||
Text("/unblock @user - unblock a user")
|
||||
Text("/clear - clear current chat")
|
||||
Text("/hug @user - send someone a hug")
|
||||
Text("/slap @user - slap with a trout")
|
||||
}
|
||||
.font(.system(size: 14, design: .monospaced))
|
||||
.foregroundColor(textColor)
|
||||
}
|
||||
|
||||
// Technical Details
|
||||
VStack(alignment: .leading, spacing: 16) {
|
||||
SectionHeader("Technical Details")
|
||||
@@ -208,6 +228,26 @@ struct AppInfoView: View {
|
||||
.foregroundColor(textColor)
|
||||
}
|
||||
|
||||
// Commands
|
||||
VStack(alignment: .leading, spacing: 16) {
|
||||
SectionHeader("Commands")
|
||||
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
Text("/j #channel - join or create a channel")
|
||||
Text("/m @user - send private message")
|
||||
Text("/w - see who's online")
|
||||
Text("/channels - show all discovered channels")
|
||||
Text("/block @user - block a user")
|
||||
Text("/block - list blocked users")
|
||||
Text("/unblock @user - unblock a user")
|
||||
Text("/clear - clear current chat")
|
||||
Text("/hug @user - send someone a hug")
|
||||
Text("/slap @user - slap with a trout")
|
||||
}
|
||||
.font(.system(size: 14, design: .monospaced))
|
||||
.foregroundColor(textColor)
|
||||
}
|
||||
|
||||
// Technical Details
|
||||
VStack(alignment: .leading, spacing: 16) {
|
||||
SectionHeader("Technical Details")
|
||||
|
||||
@@ -625,12 +625,14 @@ struct ContentView: View {
|
||||
if newValue.hasPrefix("/") && newValue.count >= 1 {
|
||||
// Build context-aware command list
|
||||
var commandDescriptions = [
|
||||
("/block", "block or list blocked users"),
|
||||
("/clear", "clear chat messages"),
|
||||
("/hug", "send someone a warm hug"),
|
||||
("/j", "join or create a channel"),
|
||||
("/m", "send private message"),
|
||||
("/channels", "show all discovered channels"),
|
||||
("/slap", "slap someone with a trout"),
|
||||
("/unblock", "unblock a user"),
|
||||
("/w", "see who's online")
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user