mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Clean-up styles and handlers
This commit is contained in:
@ -5326,7 +5326,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="flex-container wide100pLess70px character_select_container">
|
<div class="flex-container wide100pLess70px character_select_container">
|
||||||
<div class="wide100p character_name_block">
|
<div class="wide100p character_name_block">
|
||||||
<span class="ch_name"></span>
|
<span class="ch_name flex1"></span>
|
||||||
<div class="avatar-buttons">
|
<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">
|
<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>
|
<i class="fa-fw fa-solid fa-user-edit"></i>
|
||||||
|
@ -5456,7 +5456,7 @@ export async function getUserAvatars(doRender = true) {
|
|||||||
|
|
||||||
function highlightSelectedAvatar() {
|
function highlightSelectedAvatar() {
|
||||||
$('#user_avatar_block .avatar-container').removeClass('selected');
|
$('#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 () {
|
$(document).on('click', '#user_avatar_block .avatar_upload', function () {
|
||||||
$('#avatar_upload_overwrite').val('');
|
$('#avatar_upload_overwrite').val('');
|
||||||
$('#avatar_upload_file').trigger('click');
|
$('#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');
|
const avatarId = $(this).closest('.avatar-container').find('.avatar').attr('imgfile');
|
||||||
|
|
||||||
if (!avatarId) {
|
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');
|
const avatarId = $(this).closest('.avatar-container').find('.avatar').attr('imgfile');
|
||||||
|
|
||||||
if (!avatarId) {
|
if (!avatarId) {
|
||||||
@ -332,7 +333,8 @@ async function lockUserNameToChat() {
|
|||||||
updateUserLockIcon();
|
updateUserLockIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function deleteUserAvatar() {
|
async function deleteUserAvatar(e) {
|
||||||
|
e?.stopPropagation();
|
||||||
const avatarId = $(this).closest('.avatar-container').find('.avatar').attr('imgfile');
|
const avatarId = $(this).closest('.avatar-container').find('.avatar').attr('imgfile');
|
||||||
|
|
||||||
if (!avatarId) {
|
if (!avatarId) {
|
||||||
@ -429,7 +431,8 @@ function onPersonaDescriptionPositionInput() {
|
|||||||
saveSettingsDebounced();
|
saveSettingsDebounced();
|
||||||
}
|
}
|
||||||
|
|
||||||
async function setDefaultPersona() {
|
async function setDefaultPersona(e) {
|
||||||
|
e?.stopPropagation();
|
||||||
const avatarId = $(this).closest('.avatar-container').find('.avatar').attr('imgfile');
|
const avatarId = $(this).closest('.avatar-container').find('.avatar').attr('imgfile');
|
||||||
|
|
||||||
if (!avatarId) {
|
if (!avatarId) {
|
||||||
|
@ -1834,10 +1834,6 @@ grammarly-extension {
|
|||||||
z-index: 35;
|
z-index: 35;
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar-container .ch_name {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.avatar-container .avatar-buttons {
|
.avatar-container .avatar-buttons {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
@ -1850,10 +1846,6 @@ grammarly-extension {
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.avatar-buttons .menu_button {
|
|
||||||
pointer-events: all;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Ross should be able to handle this later */
|
/* Ross should be able to handle this later */
|
||||||
/*.big-avatars .avatar-buttons{
|
/*.big-avatars .avatar-buttons{
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@ -2291,10 +2283,6 @@ input[type="checkbox"]:not(#nav-toggle):not(#rm_button_panel_pin):not(#lm_button
|
|||||||
align-self: center;
|
align-self: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
#user_avatar_block .ch_description {
|
|
||||||
white-space: unset;
|
|
||||||
}
|
|
||||||
|
|
||||||
.avatar-container {
|
.avatar-container {
|
||||||
outline: 2px solid transparent;
|
outline: 2px solid transparent;
|
||||||
border: 2px solid transparent;
|
border: 2px solid transparent;
|
||||||
|
Reference in New Issue
Block a user