profile_modal: Replaces underscore style classes with hyphenated one.

This commit replaces the underscore-style classes of user profile modal
with the hyphenated one.
This commit is contained in:
Pratik 2024-04-25 20:42:50 +05:30 committed by Tim Abbott
parent 1198785c62
commit fdbce9d889
5 changed files with 21 additions and 21 deletions

View File

@ -949,7 +949,7 @@ export function initialize() {
$("body").on(
"click",
"#user-profile-modal #name .user_profile_manage_others_edit_button",
"#user-profile-modal #name .user-profile-manage-others-edit-button",
(e) => {
show_manage_user_tab("manage-profile-tab");
e.stopPropagation();
@ -960,7 +960,7 @@ export function initialize() {
/* These click handlers are implemented as just deep links to the
* relevant part of the Zulip UI, so we don't want preventDefault,
* but we do want to close the modal when you click them. */
$("body").on("click", "#user-profile-modal #name .user_profile_manage_own_edit_button", () => {
$("body").on("click", "#user-profile-modal #name .user-profile-manage-own-edit-button", () => {
hide_user_profile();
});
@ -983,7 +983,7 @@ export function initialize() {
}
});
new ClipboardJS(".copy_link_to_user_profile", {
new ClipboardJS(".copy-link-to-user-profile", {
text(trigger) {
const user_id = $(trigger).attr("data-user-id");
const user_profile_link = window.location.origin + "/#user/" + user_id;

View File

@ -59,9 +59,9 @@
}
/************************* MODAL DARK THEME *******************/
.user_profile_manage_own_edit_button,
.user_profile_manage_others_edit_button,
.user_profile_manage_own_copy_link_button {
.user-profile-manage-own-edit-button,
.user-profile-manage-others-edit-button,
.user-profile-manage-own-copy-link-button {
color: hsl(200deg 100% 50%);
cursor: pointer;

View File

@ -57,21 +57,21 @@
}
}
.user_profile_name_heading {
.user-profile-name-heading {
padding-right: 1rem;
max-width: 80%;
display: flex;
align-items: center;
.user_profile_name {
.user-profile-name {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.user_profile_manage_own_edit_button,
.user_profile_manage_others_edit_button,
.user_profile_manage_own_copy_link_button {
.user-profile-manage-own-edit-button,
.user-profile-manage-others-edit-button,
.user-profile-manage-own-copy-link-button {
color: hsl(200deg 100% 50%);
cursor: pointer;

View File

@ -533,15 +533,15 @@ ul {
}
}
.user_profile_manage_own_edit_button,
.user_profile_manage_others_edit_button {
.user-profile-manage-own-edit-button,
.user-profile-manage-others-edit-button {
width: 25px;
height: 14px;
text-align: center;
font-size: 18px;
}
.user_profile_manage_own_copy_link_button {
.user-profile-manage-own-copy-link-button {
width: 20px;
height: 15px;
text-align: center;
@ -562,7 +562,7 @@ ul {
vertical-align: middle;
}
.user_profile_name {
.user-profile-name {
margin: 0 10px;
}

View File

@ -13,21 +13,21 @@
</div>
{{/if}}
{{/unless}}
<h1 class="modal__title user_profile_name_heading" id="name">
<h1 class="modal__title user-profile-name-heading" id="name">
{{#if is_bot}}
<i class="zulip-icon zulip-icon-bot" aria-hidden="true"></i>
{{/if}}
<span class="user_profile_name">{{> user_full_name name=full_name}}</span>
<a id="user_profile_manage_own_copy_link" class="copy_link_to_user_profile" tabindex="0" data-user-id="{{user_id}}">
<i class="fa fa-link tippy-zulip-tooltip user_profile_manage_own_copy_link_button" data-tippy-content="{{t 'Copy link to profile' }}" aria-hidden="true"></i>
<span class="user-profile-name">{{> user_full_name name=full_name}}</span>
<a id="user_profile_manage_own_copy_link" class="copy-link-to-user-profile" tabindex="0" data-user-id="{{user_id}}">
<i class="fa fa-link tippy-zulip-tooltip user-profile-manage-own-copy-link-button" data-tippy-content="{{t 'Copy link to profile' }}" aria-hidden="true"></i>
</a>
{{#if is_me}}
<a id="user_profile_manage_own_edit_link" href="/#settings/profile">
<i class="fa fa-edit tippy-zulip-tooltip user_profile_manage_own_edit_button" data-tippy-content="{{t 'Edit profile' }}" aria-hidden="true"></i>
<i class="fa fa-edit tippy-zulip-tooltip user-profile-manage-own-edit-button" data-tippy-content="{{t 'Edit profile' }}" aria-hidden="true"></i>
</a>
{{/if}}
{{#if can_manage_profile}}
<i class="fa fa-edit tippy-zulip-tooltip user_profile_manage_others_edit_button" data-tippy-content="{{t 'Manage user' }}" aria-hidden="true"></i>
<i class="fa fa-edit tippy-zulip-tooltip user-profile-manage-others-edit-button" data-tippy-content="{{t 'Manage user' }}" aria-hidden="true"></i>
{{/if}}
</h1>
<button class="modal__close" aria-label="{{t 'Close modal' }}" data-micromodal-close></button>