actual proper placement, styling, timing for avatar popup

This commit is contained in:
RossAscends
2023-05-02 03:28:21 +09:00
parent bc79efd0ef
commit 32b4a209e2
2 changed files with 6 additions and 7 deletions

View File

@ -5385,7 +5385,7 @@ $(document).ready(function () {
$(document).on('click', '.mes .avatar', function () { $(document).on('click', '.mes .avatar', function () {
$('#avatar_zoom_popup').css('display', 'none');
let thumbURL = $(this).children('img').attr('src'); let thumbURL = $(this).children('img').attr('src');
let charsPath = '/characters/' let charsPath = '/characters/'
let targetAvatarImg = thumbURL.substring(thumbURL.lastIndexOf("=") + 1); let targetAvatarImg = thumbURL.substring(thumbURL.lastIndexOf("=") + 1);
@ -5402,9 +5402,11 @@ $(document).ready(function () {
let avatarPopper = Popper.createPopper(document.getElementById('top-bar'), document.getElementById('avatar_zoom_popup'), { let avatarPopper = Popper.createPopper(document.getElementById('top-bar'), document.getElementById('avatar_zoom_popup'), {
placement: 'bottom', placement: 'bottom',
}); });
avatarPopper.update();
setTimeout(function () {
avatarPopper.update();
$('#avatar_zoom_popup').toggle(); $('#avatar_zoom_popup').toggle();
}, 100);

View File

@ -3683,10 +3683,6 @@ body.noShadows * {
} }
#avatar_zoom_popup { #avatar_zoom_popup {
min-height: 0px;
min-width: 400px;
max-height: 60svh;
max-width: 40svh;
z-index: 999; z-index: 999;
display: none; display: none;
@ -3696,6 +3692,7 @@ body.noShadows * {
border: 1px solid var(--white50a); border: 1px solid var(--white50a);
border-radius: 20px; border-radius: 20px;
max-height: calc(60svh - 60px); max-height: calc(60svh - 60px);
max-width: 70svh;
box-shadow: 0 0 10px black; box-shadow: 0 0 10px black;
} }