mirror of https://github.com/zulip/zulip.git
user_card_popover: Redesign user card popover for unknown user.
This commit extends the user card popover redesign to the case where the guest is not allowed access to view some of the other users' profiles due to a change in the "Who can view all other users in the organization" permission. Fixes #27338.
This commit is contained in:
parent
9bd8a0c72c
commit
eb5bef8ff5
|
@ -290,9 +290,11 @@ function show_user_card_popover(
|
|||
let args;
|
||||
if (user.is_inaccessible_user) {
|
||||
const sent_by_url = hash_util.by_sender_url(user.email);
|
||||
const user_avatar = people.small_avatar_url_for_person(user);
|
||||
args = {
|
||||
user_id: user.user_id,
|
||||
sent_by_url,
|
||||
user_avatar,
|
||||
};
|
||||
popover_html = render_user_card_popover_for_unknown_user(args);
|
||||
} else {
|
||||
|
|
|
@ -1,13 +1,20 @@
|
|||
<div class="user-card-popover-title no-auto-hide-right-sidebar-overlay"></div>
|
||||
<div class="user-card-popover-content no-auto-hide-right-sidebar-overlay">
|
||||
<ul class="nav nav-list user-card-popover-actions" id="user_card_popover" data-user-id="{{user_id}}">
|
||||
<li class="popover_user_name_row">
|
||||
<b class="user_full_name" data-tippy-content="{{t 'Unknown user' }}">{{t "Unknown user" }}</b>
|
||||
</li>
|
||||
<hr/>
|
||||
<li>
|
||||
<a href="{{ sent_by_url }}" class="narrow_to_messages_sent">
|
||||
<i class="fa fa-paper-plane" aria-hidden="true"></i> {{t "View messages sent" }}
|
||||
<div class="popover-menu user-card-popover-actions no-auto-hide-right-sidebar-overlay" id="user_card_popover" data-simplebar data-simplebar-tab-index="-1">
|
||||
<div class="popover-menu-user-header">
|
||||
<div class="popover-menu-user-avatar-container">
|
||||
<img class="popover-menu-user-avatar" src="{{user_avatar}}" />
|
||||
</div>
|
||||
<div class="popover-menu-user-info">
|
||||
<div class="popover-menu-user-full-name" data-tippy-content="{{t 'Unknown user' }}">
|
||||
{{t 'Unknown user' }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ul role="menu" class="popover-menu-list" data-user-id="{{user_id}}">
|
||||
<li role="separator" class="popover-menu-separator hidden-for-spectators"></li>
|
||||
<li role="none" class="popover-menu-list-item link-item">
|
||||
<a role="menuitem" href="{{ sent_by_url }}" class="narrow_to_messages_sent popover-menu-link hidden-for-spectators" tabindex="0">
|
||||
<i class="popover-menu-icon zulip-icon zulip-icon-message-square" aria-hidden="true"></i>
|
||||
<span class="popover-menu-label">{{t "View messages sent" }}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue