Add block command to autocomplete, app info modal, and README

This commit is contained in:
jack
2025-07-08 02:47:04 +02:00
parent e0ce234d08
commit e4d5f5b940
3 changed files with 45 additions and 0 deletions
+3
View File
@@ -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
+40
View File
@@ -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")
+2
View File
@@ -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")
]