Skip to content

Commit

Permalink
Remove user actions in userlist
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitchdev committed Jul 31, 2024
1 parent 953e9fa commit b84f127
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 48 deletions.
31 changes: 0 additions & 31 deletions assets/chat/css/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1433,37 +1433,6 @@ hr {
visibility: visible;
align-items: center;
display: flex;
.user-actions {
position: absolute;
right: $gutter-md;
.mention-nick {
background: transparent url('../img/icon-share.svg') no-repeat center
center;
background-size: contain;
}
.whisper-nick {
background: transparent url('../img/icon-whisper.svg') no-repeat
center center;
background-size: contain;
}
.mention-nick,
.whisper-nick {
visibility: hidden;
margin-right: $gutter-xs;
margin-top: 0.45em;
display: inline-block;
opacity: 0.25;
width: 1em;
height: 1em;
&:hover {
opacity: 1;
}
}
}
&:hover .mention-nick,
&:hover .whisper-nick {
visibility: visible;
}
&:hover {
background: #282828;
}
Expand Down
18 changes: 1 addition & 17 deletions assets/chat/js/menus/ChatUserMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,6 @@ export default class ChatUserMenu extends ChatMenu {
true,
),
);
this.container.on('click', '.mention-nick', (e) => {
ChatMenu.closeMenus(this.chat);
const value = this.chat.input.val().toString().trim();
const username = $(e.target).parent().parent().data('username');
this.chat.input
.val(`${value + (value === '' ? '' : ' ') + username} `)
.focus();
return false;
});
this.container.on('click', '.whisper-nick', (e) => {
ChatMenu.closeMenus(this.chat);
const value = this.chat.input.val().toString().trim();
const username = $(e.target).parent().parent().data('username');
this.chat.input.val(`/whisper ${username} ${value}`).focus();
return false;
});
this.container.on('contextmenu', '.users .user-entry', (e) => {
const userinfo = this.chat.menus.get('user-info');
if (userinfo) {
Expand Down Expand Up @@ -244,7 +228,7 @@ export default class ChatUserMenu extends ChatMenu {
const features =
user.features.length === 0 ? 'nofeature' : user.features.join(' ');
const usr = $(
`<div class="user-entry" data-username="${user.username}" data-user-id="${user.id}"><span class="user ${features}">${label}</span><div class="user-actions"><i class="mention-nick"></i><i class="whisper-nick"></i></div></div>`,
`<div class="user-entry" data-username="${user.username}" data-user-id="${user.id}"><span class="user ${features}">${label}</span></div>`,
);
const section = this.sections.get(this.highestSection(user));

Expand Down

0 comments on commit b84f127

Please sign in to comment.