compose: Show bot icon after bot name in recipient picker.

Bot icon shown in the typeahead recipient list which pops up
in the compose box while typing.
On typeahead hover, bot icon takes the color of the font
for better contrast.
This commit is contained in:
Vishesh Singh 2024-10-13 00:49:28 +05:30 committed by Tim Abbott
parent 649103a795
commit 7e1962dea5
3 changed files with 10 additions and 0 deletions

View File

@ -145,6 +145,7 @@ export function render_person(person: UserPillData | UserOrMentionPillData): str
img_src: avatar_url, img_src: avatar_url,
user_circle_class, user_circle_class,
is_person: true, is_person: true,
is_bot: person.user.is_bot,
status_emoji_info, status_emoji_info,
should_add_guest_user_indicator: people.should_add_guest_user_indicator( should_add_guest_user_indicator: people.should_add_guest_user_indicator(
person.user.user_id, person.user.user_id,

View File

@ -179,3 +179,9 @@
margin-left: 14px; margin-left: 14px;
} }
} }
.typeahead-text-container {
i.zulip-icon-bot {
align-self: center;
}
}

View File

@ -25,6 +25,9 @@
{{~ primary ~}} {{~ primary ~}}
{{~/if~}} {{~/if~}}
</strong> </strong>
{{~#if is_bot}}
<i class="zulip-icon zulip-icon-bot" aria-label="{{t 'Bot' }}"></i>
{{/if}}
{{~#if has_pronouns}} {{~#if has_pronouns}}
<span class="pronouns">{{pronouns}}{{#if (or has_secondary_html has_secondary)}},{{/if}}</span> <span class="pronouns">{{pronouns}}{{#if (or has_secondary_html has_secondary)}},{{/if}}</span>
{{~/if}} {{~/if}}