popovers: Add bot icon to user profile popovers for bots.

Fixes #7176.
This commit is contained in:
Cynthia Lin 2017-10-15 20:40:09 -07:00 committed by Tim Abbott
parent a3e5f2a887
commit 1bcc07f7dd
3 changed files with 17 additions and 3 deletions

View File

@ -100,6 +100,7 @@ function show_user_info_popover(element, user, message) {
narrowed: narrow_state.active(),
private_message_class: "respond_personal_button",
is_active: people.is_active_user_for_popover(user.user_id),
is_bot: people.get_person_from_user_id(user.user_id).is_bot,
};
var ypos = elt.offset().top;
@ -458,6 +459,7 @@ exports.register_click_handlers = function () {
sent_by_uri: narrow.by_sender_uri(user_email),
private_message_class: "compose_private_message",
is_active: people.is_active_user_for_popover(user_id),
is_bot: user.is_bot,
};
target.popover({

View File

@ -1160,13 +1160,21 @@ td.pointer {
color: hsl(200, 100%, 40%);
}
.message_sender i.zulip-icon.bot {
.message_sender i.zulip-icon.bot,
.popover_info i.zulip-icon.bot {
color: hsl(180, 5%, 74%);
font-size: 12px;
vertical-align: top;
padding: 0 2px;
}
.message_sender i.zulip-icon.bot {
font-size: 12px;
}
.popover_info i.zulip-icon.bot {
margin-top: 3px;
}
.actions_hover:hover {
color: hsl(200, 100%, 40%);
}

View File

@ -4,8 +4,12 @@
<li class="user_{{presence_status}}">
<b>{{user_full_name}}</b>
{{#if is_active }}
{{#if is_bot}}
<i class="zulip-icon bot" aria-hidden="true"></i>
{{else}}
<span class="user-status-indicator popover_user_presence" title="{{user_last_seen_time_status}}"></span>
{{/if}}
{{/if}}
</li>
{{#if is_active }}