Clean-up styles and handlers
This commit is contained in:
parent
07686291f6
commit
c01217ac76
|
@ -5326,7 +5326,7 @@
|
|||
</div>
|
||||
<div class="flex-container wide100pLess70px character_select_container">
|
||||
<div class="wide100p character_name_block">
|
||||
<span class="ch_name"></span>
|
||||
<span class="ch_name flex1"></span>
|
||||
<div class="avatar-buttons">
|
||||
<button class="menu_button bind_user_name" title="Bind user name to that avatar" data-i18n="[title]Bind user name to that avatar">
|
||||
<i class="fa-fw fa-solid fa-user-edit"></i>
|
||||
|
|
|
@ -5456,7 +5456,7 @@ export async function getUserAvatars(doRender = true) {
|
|||
|
||||
function highlightSelectedAvatar() {
|
||||
$('#user_avatar_block .avatar-container').removeClass('selected');
|
||||
$('#user_avatar_block').find(`.avatar-container[imgfile='${user_avatar}']`).addClass('selected');
|
||||
$(`#user_avatar_block .avatar-container[imgfile='${user_avatar}']`).addClass('selected');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -8116,12 +8116,13 @@ jQuery(async function () {
|
|||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '#user_avatar_block .avatar, #user_avatar_block .avatar-container', setUserAvatar);
|
||||
$(document).on('click', '#user_avatar_block .avatar-container', setUserAvatar);
|
||||
$(document).on('click', '#user_avatar_block .avatar_upload', function () {
|
||||
$('#avatar_upload_overwrite').val('');
|
||||
$('#avatar_upload_file').trigger('click');
|
||||
});
|
||||
$(document).on('click', '#user_avatar_block .set_persona_image', function () {
|
||||
$(document).on('click', '#user_avatar_block .set_persona_image', function (e) {
|
||||
e.stopPropagation();
|
||||
const avatarId = $(this).closest('.avatar-container').find('.avatar').attr('imgfile');
|
||||
|
||||
if (!avatarId) {
|
||||
|
|
|
@ -210,7 +210,8 @@ export async function updatePersonaNameIfExists(avatarId, newName) {
|
|||
}
|
||||
}
|
||||
|
||||
async function bindUserNameToPersona() {
|
||||
async function bindUserNameToPersona(e) {
|
||||
e?.stopPropagation();
|
||||
const avatarId = $(this).closest('.avatar-container').find('.avatar').attr('imgfile');
|
||||
|
||||
if (!avatarId) {
|
||||
|
@ -332,7 +333,8 @@ async function lockUserNameToChat() {
|
|||
updateUserLockIcon();
|
||||
}
|
||||
|
||||
async function deleteUserAvatar() {
|
||||
async function deleteUserAvatar(e) {
|
||||
e?.stopPropagation();
|
||||
const avatarId = $(this).closest('.avatar-container').find('.avatar').attr('imgfile');
|
||||
|
||||
if (!avatarId) {
|
||||
|
@ -429,7 +431,8 @@ function onPersonaDescriptionPositionInput() {
|
|||
saveSettingsDebounced();
|
||||
}
|
||||
|
||||
async function setDefaultPersona() {
|
||||
async function setDefaultPersona(e) {
|
||||
e?.stopPropagation();
|
||||
const avatarId = $(this).closest('.avatar-container').find('.avatar').attr('imgfile');
|
||||
|
||||
if (!avatarId) {
|
||||
|
|
|
@ -1834,10 +1834,6 @@ grammarly-extension {
|
|||
z-index: 35;
|
||||
}
|
||||
|
||||
.avatar-container .ch_name {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.avatar-container .avatar-buttons {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
@ -1850,10 +1846,6 @@ grammarly-extension {
|
|||
opacity: 1;
|
||||
}
|
||||
|
||||
.avatar-buttons .menu_button {
|
||||
pointer-events: all;
|
||||
}
|
||||
|
||||
/* Ross should be able to handle this later */
|
||||
/*.big-avatars .avatar-buttons{
|
||||
justify-content: center;
|
||||
|
@ -2291,10 +2283,6 @@ input[type="checkbox"]:not(#nav-toggle):not(#rm_button_panel_pin):not(#lm_button
|
|||
align-self: center;
|
||||
}
|
||||
|
||||
#user_avatar_block .ch_description {
|
||||
white-space: unset;
|
||||
}
|
||||
|
||||
.avatar-container {
|
||||
outline: 2px solid transparent;
|
||||
border: 2px solid transparent;
|
||||
|
|
Loading…
Reference in New Issue