add help for names

This commit is contained in:
Alain Brenzikofer
2026-08-18 16:21:28 +02:00
parent 4f75f832af
commit 75d093e79a
4 changed files with 25 additions and 2 deletions
+1 -1
View File
@@ -324,7 +324,7 @@ data ChatController = ChatController
contactMergeEnabled :: TVar Bool
}
data HelpSection = HSMain | HSFiles | HSGroups | HSContacts | HSMyAddress | HSIncognito | HSMarkdown | HSMessages | HSRemote | HSSettings | HSDatabase
data HelpSection = HSMain | HSFiles | HSGroups | HSContacts | HSMyAddress | HSIncognito | HSMarkdown | HSMessages | HSRemote | HSSettings | HSDatabase | HSNames
deriving (Show)
data ChatCommand
+22 -1
View File
@@ -14,6 +14,7 @@ module Simplex.Chat.Help
markdownInfo,
settingsInfo,
databaseHelpInfo,
namesHelpInfo,
)
where
@@ -88,7 +89,7 @@ chatHelpInfo =
green "Create your address: " <> highlight "/address",
"",
green "Other commands:",
indent <> highlight "/help <topic> " <> " - help on: " <> listHighlight ["groups", "contacts", "messages", "files", "address", "incognito", "remote", "settings", "db"],
indent <> highlight "/help <topic> " <> " - help on: " <> listHighlight ["groups", "contacts", "messages", "files", "address", "incognito", "remote", "settings", "db", "names"],
indent <> highlight "/profile " <> " - show / update user profile",
indent <> highlight "/delete <contact>" <> " - delete contact and all messages with them",
indent <> highlight "/chats " <> " - most recent chats",
@@ -218,6 +219,26 @@ myAddressHelpInfo =
"The commands may be abbreviated: " <> listHighlight ["/ad", "/da", "/sa", "/ac", "/rc"]
]
namesHelpInfo :: [StyledString]
namesHelpInfo =
map
styleMarkdown
[ green "SimpleX name commands:",
indent <> highlight "/name register <service> <name> <simplex_link>",
indent <> indent <> " - register a name for your address or channel",
"",
green "Arguments:",
indent <> highlight "<service> " <> " - address of the names service to register with",
indent <> highlight "<name> " <> " - the name to register, e.g. " <> highlight "alice.simplex",
indent <> highlight "<simplex_link>" <> " - the contact address or channel the name should resolve to",
"",
"Registration takes a few seconds: the name is committed first, and revealed",
"after a short wait, so the service cannot register it before you do.",
"",
"Please note: this is in development. The name is registered against a mock,",
"not a blockchain, and it cannot yet be edited, transferred or renewed."
]
incognitoHelpInfo :: [StyledString]
incognitoHelpInfo =
map
+1
View File
@@ -5700,6 +5700,7 @@ chatCommandP =
("/help remote" <|> "/hr") $> ChatHelp HSRemote,
("/help settings" <|> "/hs") $> ChatHelp HSSettings,
("/help db" <|> "/hd") $> ChatHelp HSDatabase,
("/help names" <|> "/help name" <|> "/hn") $> ChatHelp HSNames,
("/help" <|> "/h") $> ChatHelp HSMain,
("/group" <|> "/g") *> (NewGroup <$> incognitoP <* A.space <* char_ '#' <*> groupProfile),
"/_group " *> (APINewGroup <$> A.decimal <*> incognitoOnOffP <* A.space <*> jsonP),
+1
View File
@@ -182,6 +182,7 @@ chatResponseToView hu cfg@ChatConfig {logLevel, showReactions, showFullLinks, te
HSRemote -> remoteHelpInfo
HSSettings -> settingsInfo
HSDatabase -> databaseHelpInfo
HSNames -> namesHelpInfo
CRWelcome user -> chatWelcome user
CRContactsList u cs -> ttyUser u $ viewContactsList cs
CRUserContactLink u UserContactLink {connLinkContact, addressSettings} -> ttyUser u $ connReqContact_ showFullLinks "Your chat address:" connLinkContact <> viewAddressSettings addressSettings