mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-03-31 05:25:47 +00:00
show client service status in users list
This commit is contained in:
@@ -588,13 +588,14 @@ viewUsersList us =
|
||||
in if null ss then ["no users"] else ss
|
||||
where
|
||||
ldn (UserInfo User {localDisplayName = n} _) = T.toLower n
|
||||
userInfo (UserInfo User {localDisplayName = n, profile = LocalProfile {fullName, shortDescr, peerType}, activeUser, showNtfs, viewPwdHash} count)
|
||||
userInfo (UserInfo User {localDisplayName = n, profile = LocalProfile {fullName, shortDescr, peerType}, activeUser, showNtfs, viewPwdHash, clientService} count)
|
||||
| activeUser || isNothing viewPwdHash = Just $ ttyFullName n fullName shortDescr <> infoStr <> bot
|
||||
| otherwise = Nothing
|
||||
where
|
||||
infoStr = if null info then "" else " (" <> mconcat (intersperse ", " info) <> ")"
|
||||
info =
|
||||
[highlight' "active" | activeUser]
|
||||
<> [highlight' "service" | isTrue clientService]
|
||||
<> [highlight' "hidden" | isJust viewPwdHash]
|
||||
<> ["muted" | not showNtfs]
|
||||
<> [plain ("unread: " <> show count) | count /= 0]
|
||||
|
||||
@@ -4201,6 +4201,8 @@ testClientService ps =
|
||||
alice <##> service
|
||||
service ##> "/set client service 1:service_user off"
|
||||
service <## "error: chat not stopped"
|
||||
service ##> "/users"
|
||||
service <## "service_user (Service user) (active, service)"
|
||||
-- connect as service
|
||||
withTestChat ps "service" $ \service -> do
|
||||
subscribeClientService service 1
|
||||
|
||||
Reference in New Issue
Block a user