2022-01-22 00:45:11 +01:00
|
|
|
<div class="micromodal" id="user-profile-modal" data-user-id="{{user_id}}" aria-hidden="true">
|
2022-11-11 08:10:56 +01:00
|
|
|
<div class="modal__overlay" tabindex="-1">
|
2022-10-20 20:14:36 +02:00
|
|
|
<div class="modal__container new-style" role="dialog" aria-modal="true" aria-labelledby="dialog_title">
|
2022-10-14 00:34:57 +02:00
|
|
|
<div class="modal__header">
|
2024-04-25 17:12:50 +02:00
|
|
|
<h1 class="modal__title user-profile-name-heading" id="name">
|
2024-04-03 09:24:40 +02:00
|
|
|
{{#unless is_bot}}
|
|
|
|
{{#if is_active}}
|
|
|
|
<div class="tippy-zulip-tooltip" data-tippy-content="{{last_seen}}">
|
2024-07-09 18:59:01 +02:00
|
|
|
<span class="{{user_circle_class}} user_circle user_profile_presence" data-presence-indicator-user-id="{{user_id}}"></span>
|
2024-04-03 09:24:40 +02:00
|
|
|
</div>
|
|
|
|
{{else}}
|
|
|
|
<div>
|
|
|
|
<i class="fa fa-ban deactivated-user-icon tippy-zulip-tooltip" data-tippy-content="Deactivated user"></i>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
{{/unless}}
|
2022-08-24 13:46:25 +02:00
|
|
|
{{#if is_bot}}
|
2023-09-09 13:13:14 +02:00
|
|
|
<i class="zulip-icon zulip-icon-bot" aria-hidden="true"></i>
|
2022-08-24 13:46:25 +02:00
|
|
|
{{/if}}
|
2024-04-25 17:12:50 +02:00
|
|
|
<span class="user-profile-name">{{> user_full_name name=full_name}}</span>
|
2024-02-24 01:09:19 +01:00
|
|
|
<a class="copy-link-to-user-profile user-profile-manage-own-copy-link-button" tabindex="0" data-user-id="{{user_id}}">
|
|
|
|
<i class="zulip-icon zulip-icon-link tippy-zulip-tooltip " data-tippy-content="{{t 'Copy link to profile' }}" aria-hidden="true"></i>
|
2024-01-25 15:45:10 +01:00
|
|
|
</a>
|
2021-07-22 17:50:59 +02:00
|
|
|
{{#if is_me}}
|
2024-02-24 01:09:19 +01:00
|
|
|
<a class="user-profile-manage-own-edit-button" href="/#settings/profile">
|
|
|
|
<i class="zulip-icon zulip-icon-edit tippy-zulip-tooltip" data-tippy-content="{{t 'Edit profile' }}" aria-hidden="true"></i>
|
2023-09-09 13:13:14 +02:00
|
|
|
</a>
|
|
|
|
{{/if}}
|
|
|
|
{{#if can_manage_profile}}
|
2024-02-24 01:09:19 +01:00
|
|
|
<div class="user-profile-manage-others-edit-button">
|
|
|
|
<i class="zulip-icon zulip-icon-edit tippy-zulip-tooltip" data-tippy-content="{{t 'Manage user' }}" aria-hidden="true"></i>
|
|
|
|
</div>
|
2021-06-03 09:36:43 +02:00
|
|
|
{{/if}}
|
2022-10-14 00:34:57 +02:00
|
|
|
</h1>
|
|
|
|
<button class="modal__close" aria-label="{{t 'Close modal' }}" data-micromodal-close></button>
|
|
|
|
</div>
|
|
|
|
<div id="tab-toggle" class="center"></div>
|
2024-06-16 13:46:37 +02:00
|
|
|
<main class="modal__body" id="body" data-simplebar data-simplebar-tab-index="-1" data-simplebar-auto-hide="false">
|
2021-07-22 17:50:59 +02:00
|
|
|
<div class="tab-data">
|
|
|
|
<div class="tabcontent active" id="profile-tab">
|
2022-06-05 16:37:04 +02:00
|
|
|
<div class="top">
|
|
|
|
<div class="col-wrap col-left">
|
|
|
|
<div id="default-section">
|
2021-10-26 15:43:39 +02:00
|
|
|
{{#if email}}
|
2022-06-05 16:37:04 +02:00
|
|
|
<div id="email" class="default-field">
|
2023-03-15 23:51:27 +01:00
|
|
|
<div class="name">{{t "Email" }}</div>
|
2022-06-05 16:37:04 +02:00
|
|
|
<div class="value">{{email}}</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
<div id="user-id" class="default-field">
|
2023-03-15 23:51:27 +01:00
|
|
|
<div class="name">{{t "User ID" }}</div>
|
2022-06-05 16:37:04 +02:00
|
|
|
<div class="value">{{user_id}}</div>
|
|
|
|
</div>
|
|
|
|
<div id="user-type" class="default-field">
|
2023-03-15 23:51:27 +01:00
|
|
|
<div class="name">{{t "Role" }}</div>
|
2022-08-24 13:46:25 +02:00
|
|
|
{{#if is_bot}}
|
|
|
|
{{#if is_system_bot}}
|
2023-03-15 23:51:27 +01:00
|
|
|
<div class="value">{{t "System bot" }}</div>
|
2022-08-24 13:46:25 +02:00
|
|
|
{{else}}
|
2024-07-29 23:58:46 +02:00
|
|
|
<div class="value">{{t "Bot ({user_type})" }}</div>
|
2022-08-24 13:46:25 +02:00
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
|
|
|
<div class="value">{{user_type}}</div>
|
|
|
|
{{/if}}
|
2022-06-05 16:37:04 +02:00
|
|
|
</div>
|
|
|
|
<div id="date-joined" class="default-field">
|
2023-03-15 23:51:27 +01:00
|
|
|
<div class="name">{{t "Joined" }}</div>
|
2022-06-05 16:37:04 +02:00
|
|
|
<div class="value">{{date_joined}}</div>
|
|
|
|
</div>
|
|
|
|
{{#if user_time}}
|
|
|
|
<div class="default-field">
|
2023-03-15 23:51:27 +01:00
|
|
|
<div class="name">{{t "Local time" }}</div>
|
2022-06-05 16:37:04 +02:00
|
|
|
<div class="value">{{user_time}}</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
2022-06-05 14:12:19 +02:00
|
|
|
</div>
|
2022-06-05 16:37:04 +02:00
|
|
|
</div>
|
|
|
|
<div class="col-wrap col-right">
|
|
|
|
<div id="avatar" {{#if user_is_guest}} class="guest-avatar" {{/if}}
|
|
|
|
style="background-image: url('{{user_avatar}}');">
|
2022-06-05 14:12:19 +02:00
|
|
|
</div>
|
2022-03-10 14:43:17 +01:00
|
|
|
</div>
|
2022-06-05 16:37:04 +02:00
|
|
|
</div>
|
|
|
|
<div class="bottom">
|
2022-06-05 14:12:19 +02:00
|
|
|
<div id="content">
|
2022-08-24 13:46:25 +02:00
|
|
|
{{#if is_bot}}
|
|
|
|
<div class="field-section">
|
2023-03-15 23:51:27 +01:00
|
|
|
<div class="name">{{t "Bot type" }}</div>
|
2022-08-24 13:46:25 +02:00
|
|
|
<div class="bot_info_value">{{bot_type}}</div>
|
|
|
|
</div>
|
|
|
|
{{#if bot_owner}}
|
|
|
|
<div class="field-section bot_owner_user_field" data-field-id="{{bot_owner.user_id}}">
|
2023-03-15 23:51:27 +01:00
|
|
|
<div class="name">{{t "Owner" }}</div>
|
2022-08-24 13:46:25 +02:00
|
|
|
<div class="pill-container not-editable">
|
|
|
|
<div class="input" contenteditable="false" style="display: none;"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{/if}}
|
|
|
|
{{else}}
|
2023-02-21 13:18:57 +01:00
|
|
|
{{> user_custom_profile_fields profile_fields=profile_data}}
|
2022-08-24 13:46:25 +02:00
|
|
|
{{/if}}
|
2021-06-03 09:36:43 +02:00
|
|
|
</div>
|
2021-07-22 17:50:59 +02:00
|
|
|
</div>
|
2021-06-03 09:36:43 +02:00
|
|
|
</div>
|
|
|
|
|
2021-07-22 17:50:59 +02:00
|
|
|
<div class="tabcontent" id="user-profile-streams-tab">
|
2023-09-08 19:37:58 +02:00
|
|
|
<div class="alert stream_list_info"></div>
|
|
|
|
{{#if show_user_subscribe_widget}}
|
|
|
|
<div class="header-section">
|
2024-04-18 18:36:57 +02:00
|
|
|
<h3 class="stream-tab-element-header">{{t 'Subscribe {full_name} to channels'}}</h3>
|
2023-09-08 19:37:58 +02:00
|
|
|
</div>
|
|
|
|
{{> user_profile_subscribe_widget}}
|
|
|
|
{{/if}}
|
2021-07-22 17:50:59 +02:00
|
|
|
<div class="stream-list-top-section">
|
|
|
|
<div class="header-section">
|
2024-04-18 18:36:57 +02:00
|
|
|
<h3 class="stream-tab-element-header">{{t 'Subscribed channels' }}</h3>
|
2021-07-22 17:50:59 +02:00
|
|
|
</div>
|
2024-04-18 18:36:57 +02:00
|
|
|
<input type="text" class="stream-search modal_text_input" placeholder="{{t 'Filter channels' }}" />
|
2021-07-22 17:50:59 +02:00
|
|
|
<button type="button" class="clear_search_button" id="clear_stream_search">
|
|
|
|
<i class="fa fa-remove" aria-hidden="true"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
2023-08-24 19:07:11 +02:00
|
|
|
<div class="subscription-stream-list empty-list">
|
2024-04-18 18:36:57 +02:00
|
|
|
<table class="user-stream-list" data-empty="{{t 'No channel subscriptions.'}}" data-search-results-empty="{{t 'No matching channels' }}"></table>
|
2021-07-22 17:50:59 +02:00
|
|
|
</div>
|
2021-06-30 18:47:04 +02:00
|
|
|
</div>
|
2021-06-23 09:55:13 +02:00
|
|
|
|
2021-07-22 17:50:59 +02:00
|
|
|
<div class="tabcontent" id="user-profile-groups-tab">
|
2023-08-24 19:07:11 +02:00
|
|
|
<div class="subscription-group-list empty-list">
|
2021-07-22 17:50:59 +02:00
|
|
|
<table class="user-group-list" data-empty="{{t 'No user group subscriptions.'}}"></table>
|
|
|
|
</div>
|
|
|
|
</div>
|
settings_users: Migrate manage user modal to full profile modal.
This commit migrates the "manage user" modal to the "Full Profile"
modal. Refactored the show_edit_user_info_modal function since
earlier, we used to have a separate "Manage User" modal.
Consequently, we checked if we were coming from the
user_info_popover and then built the dialog widget accordingly.
However, with this new change, we no longer need to build the
dialog widget. Therefore, removed that part and now just pass
the container of the 'user profile modal' to get the content.
Previously, for deactivation, we used to have a separate dialog
widget. But now, since we have a dedicated function to handle
this case, refactored the deactivation code to use the
'confirm_deactivation' function.
Additionally, created two new functions to handle the loading
spinner. Since we will need these functions in the future for
the "Manage Bot" modal, we marked them as exported.
"Since we do not want to show the 'Manage User' tab to the user
looking at their own profile, in the 'can_manage_user' function
that we use to render the 'Manage User' tab, we check if the user
profile popover belongs to the same user. If it does, we set it to
'false' instead of 'true,' ensuring that the 'Manage User' tab is
not visible.
Added a new tab in the user profile modal 'manage user'.
Fixes: #21806
2023-09-09 12:42:04 +02:00
|
|
|
<div class="tabcontent" id="manage-profile-tab"></div>
|
2021-06-23 09:55:13 +02:00
|
|
|
</div>
|
2021-07-22 17:50:59 +02:00
|
|
|
</main>
|
user_profile: Fix inconsistent height of user profile switching tabs.
This commit fixes the inconsistent height of the user profile when
switching tabs. We now have four tabs in the user profile:
"Profile," "Streams," "User Groups," and "Manage User." However,
the "Manage User" tab has footer buttons that need to remain
sticky at the bottom without changing the overall height of
the modal.
To achieve this, we wrapped the footer inside a div element and
assigned it a class called "manage-profile-tab-footer." The main
body of the user profile is given a height of 60vh. However, for
the "Manage User" tab, we decreased this height to 52vh and
allocated the remaining 8vh height to the div element to
accommodate the footer buttons. This ensures that the user
profile maintains consistent height when switching between tabs.
However, we have a 1px border in the footer, so to ensure that
the height is consistent, we reduce the height of the modal
content by 1px, making it calc(52vh - 1px).
To implement this, CSS code was added to the "popover.css" file
and accessed through the class specified in the "user_profile.js"
file.
The default padding of the buttons inside footer is 20px, but
with the above solution on large screens the buttons are not
aligned properly, so removed the padding top and bottom
and instead applied the flex box and property to align the buttons.
2023-09-09 14:26:50 +02:00
|
|
|
<div class="manage-profile-tab-footer">
|
|
|
|
<footer class="modal__footer">
|
2024-03-07 11:46:02 +01:00
|
|
|
<div class="save-success"></div>
|
user_profile: Fix inconsistent height of user profile switching tabs.
This commit fixes the inconsistent height of the user profile when
switching tabs. We now have four tabs in the user profile:
"Profile," "Streams," "User Groups," and "Manage User." However,
the "Manage User" tab has footer buttons that need to remain
sticky at the bottom without changing the overall height of
the modal.
To achieve this, we wrapped the footer inside a div element and
assigned it a class called "manage-profile-tab-footer." The main
body of the user profile is given a height of 60vh. However, for
the "Manage User" tab, we decreased this height to 52vh and
allocated the remaining 8vh height to the div element to
accommodate the footer buttons. This ensures that the user
profile maintains consistent height when switching between tabs.
However, we have a 1px border in the footer, so to ensure that
the height is consistent, we reduce the height of the modal
content by 1px, making it calc(52vh - 1px).
To implement this, CSS code was added to the "popover.css" file
and accessed through the class specified in the "user_profile.js"
file.
The default padding of the buttons inside footer is 20px, but
with the above solution on large screens the buttons are not
aligned properly, so removed the padding top and bottom
and instead applied the flex box and property to align the buttons.
2023-09-09 14:26:50 +02:00
|
|
|
<button type="button" class="modal__btn dialog_exit_button" aria-label="{{t 'Close this dialog window' }}" data-micromodal-close>{{t "Cancel" }}</button>
|
|
|
|
<button type="button" class="modal__btn dialog_submit_button">
|
|
|
|
<span>{{t "Save changes"}}</span>
|
|
|
|
<div class="modal__spinner"></div>
|
|
|
|
</button>
|
|
|
|
</footer>
|
|
|
|
</div>
|
2018-04-23 20:41:35 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|