recent: Replace presence dot with bot icon for bots.

This commit replaces the presence dot with a bot icon for
private messages (PMs) with bots in the recent conversations
narrow.
This commit is contained in:
palashb01 2023-04-18 04:06:34 +05:30 committed by Tim Abbott
parent 8eb90bbc7f
commit acba8518fb
3 changed files with 6 additions and 5 deletions

View File

@ -433,9 +433,8 @@ function format_conversation(conversation_data) {
const user_id = Number.parseInt(last_msg.to_user_ids, 10); const user_id = Number.parseInt(last_msg.to_user_ids, 10);
const user = people.get_by_user_id(user_id); const user = people.get_by_user_id(user_id);
if (user.is_bot) { if (user.is_bot) {
// Bots do not have status emoji, and are modeled as // We display the bot icon rather than a user circle for bots.
// always present. context.is_bot = true;
context.user_circle_class = "user_circle_green";
} else { } else {
context.user_circle_class = buddy_data.get_user_circle_class(user_id); context.user_circle_class = buddy_data.get_user_circle_class(user_id);
} }

View File

@ -408,9 +408,9 @@
width: 14px; width: 14px;
height: 14px; height: 14px;
.fa-group { .fa-group,
.zulip-icon.zulip-icon-bot {
font-size: 0.8rem; font-size: 0.8rem;
/* color: hsl(105, 2%, 50%); */
opacity: 0.6; opacity: 0.6;
} }

View File

@ -18,6 +18,8 @@
<span class="pm_status_icon {{#unless is_group}}show-tooltip{{/unless}}" data-tippy-placement="top" data-user-ids-string="{{user_ids_string}}"> <span class="pm_status_icon {{#unless is_group}}show-tooltip{{/unless}}" data-tippy-placement="top" data-user-ids-string="{{user_ids_string}}">
{{#if is_group}} {{#if is_group}}
<span class="fa fa-group"></span> <span class="fa fa-group"></span>
{{else if is_bot}}
<span class="zulip-icon zulip-icon-bot" aria-hidden="true"></span>
{{else}} {{else}}
<span class="{{user_circle_class}} user_circle"></span> <span class="{{user_circle_class}} user_circle"></span>
{{/if}} {{/if}}