Skip to content

Commit

Permalink
Merge pull request #513 from destinygg/remove-user-actions
Browse files Browse the repository at this point in the history
Remove mention button from userlist
  • Loading branch information
11k authored Nov 24, 2024
2 parents 5db439a + 2614819 commit 7522728
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 24 deletions.
15 changes: 2 additions & 13 deletions assets/chat/css/menus/_user-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -61,36 +61,25 @@
display: flex;

.user-actions {
display: flex;
position: absolute;
right: a.$gutter-md;

.mention-nick,
.whisper-nick {
@include a.icon-background('../img/icon-whisper.svg');
visibility: hidden;
margin-right: a.$gutter-xs;
margin-top: 0.45em;
display: inline-block;
opacity: 0.25;
width: 1em;
height: 1em;
&:hover {
opacity: 1;
}
}

.mention-nick {
@include a.icon-background('../img/icon-share.svg');
}

.whisper-nick {
@include a.icon-background('../img/icon-whisper.svg');
}
}

&:hover {
background: #282828;

.mention-nick,
.whisper-nick {
visibility: visible;
}
Expand Down
1 change: 0 additions & 1 deletion assets/chat/img/icon-share.svg

This file was deleted.

11 changes: 1 addition & 10 deletions assets/chat/js/menus/ChatUserMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,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();
Expand Down Expand Up @@ -257,7 +248,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" data-tippy-content="Mention"></i><i class="whisper-nick" data-tippy-content="Whisper"></i></div></div>`,
`<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="whisper-nick" data-tippy-content="Whisper"></i></div></div>`,
);
usr.find('[data-tippy-content]').each(function registerTippy() {
tippy(this, {
Expand Down

0 comments on commit 7522728

Please sign in to comment.