mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
actual proper placement, styling, timing for avatar popup
This commit is contained in:
@ -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();
|
|
||||||
|
|
||||||
$('#avatar_zoom_popup').toggle();
|
setTimeout(function () {
|
||||||
|
avatarPopper.update();
|
||||||
|
$('#avatar_zoom_popup').toggle();
|
||||||
|
}, 100);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user