mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-09-28 02:38:44 +00:00
add help for names
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user