mirror of
https://github.com/zulip/zulip.git
synced 2025-10-22 20:42:14 +00:00
user-profile: Rename class for edit pencil buttons.
This commit renames classes used for edit pencil button in the profile modal header so that class names are clear enough to specify what the buttons do. This rename is needed because admins can now see "Edit profile" tab, i.e. the "Manage user" tab for other users, in their own profile modal. Co-Authored-by: Aman Vishwakarma <vishwakarmarambhawan572@gmail.com>
This commit is contained in:
@@ -1449,17 +1449,13 @@ export function initialize(): void {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$("body").on(
|
||||
"click",
|
||||
"#user-profile-modal #name .user-profile-manage-others-edit-button",
|
||||
(e) => {
|
||||
show_manage_user_tab("manage-profile-tab");
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
},
|
||||
);
|
||||
$("body").on("click", "#user-profile-modal #name .user-profile-update-user-tab-button", (e) => {
|
||||
show_manage_user_tab("manage-profile-tab");
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
$("body").on("click", "#user-profile-modal #name .user-profile-manage-own-edit-button", () => {
|
||||
$("body").on("click", "#user-profile-modal #name .user-profile-profile-settings-button", () => {
|
||||
browser_history.go_to_location("#settings/profile");
|
||||
hide_user_profile();
|
||||
});
|
||||
|
@@ -22,15 +22,15 @@
|
||||
{{> components/icon_button custom_classes="copy-link-to-user-profile tippy-zulip-delayed-tooltip" icon="link-alt" intent="neutral" data-tippy-content=(t "Copy link to profile") aria-label=(t "Copy link to profile") }}
|
||||
{{#if is_me}}
|
||||
{{#if can_manage_profile}}
|
||||
{{> components/icon_button custom_classes="user-profile-manage-others-edit-button tippy-zulip-delayed-tooltip" icon="edit" intent="neutral" data-tippy-content=(t "Edit profile") aria-label=(t "Edit profile") }}
|
||||
{{> components/icon_button custom_classes="user-profile-update-user-tab-button tippy-zulip-delayed-tooltip" icon="edit" intent="neutral" data-tippy-content=(t "Edit profile") aria-label=(t "Edit profile") }}
|
||||
{{else}}
|
||||
{{> components/icon_button custom_classes="user-profile-manage-own-edit-button tippy-zulip-delayed-tooltip" icon="edit" intent="neutral" data-tippy-content=(t "Edit profile") aria-label=(t "Edit profile") }}
|
||||
{{> components/icon_button custom_classes="user-profile-profile-settings-button tippy-zulip-delayed-tooltip" icon="edit" intent="neutral" data-tippy-content=(t "Edit profile") aria-label=(t "Edit profile") }}
|
||||
{{/if}}
|
||||
{{else if can_manage_profile}}
|
||||
{{#if is_bot}}
|
||||
{{> components/icon_button custom_classes="user-profile-manage-others-edit-button tippy-zulip-delayed-tooltip" icon="edit" intent="neutral" data-tippy-content=(t "Manage bot") aria-label=(t "Manage bot") }}
|
||||
{{> components/icon_button custom_classes="user-profile-update-user-tab-button tippy-zulip-delayed-tooltip" icon="edit" intent="neutral" data-tippy-content=(t "Manage bot") aria-label=(t "Manage bot") }}
|
||||
{{else}}
|
||||
{{> components/icon_button custom_classes="user-profile-manage-others-edit-button tippy-zulip-delayed-tooltip" icon="edit" intent="neutral" data-tippy-content=(t "Manage user") aria-label=(t 'Manage user') }}
|
||||
{{> components/icon_button custom_classes="user-profile-update-user-tab-button tippy-zulip-delayed-tooltip" icon="edit" intent="neutral" data-tippy-content=(t "Manage user") aria-label=(t 'Manage user') }}
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
</span>
|
||||
|
Reference in New Issue
Block a user