more avatar popup corrections

- disabled on mobile normal mode
- leftside on normal mode PC
This commit is contained in:
RossAscends
2023-05-02 05:35:30 +09:00
parent d0950deca7
commit c8408ddf34
2 changed files with 48 additions and 14 deletions

View File

@ -5385,20 +5385,22 @@ $(document).ready(function () {
$(document).on('click', '.mes .avatar', function () {
if (window.innerWidth > 1000 || $('body').hasClass('waifuMode')) {
let thumbURL = $(this).children('img').attr('src');
let charsPath = '/characters/'
let targetAvatarImg = thumbURL.substring(thumbURL.lastIndexOf("=") + 1);
let avatarSrc = charsPath + targetAvatarImg;
let thumbURL = $(this).children('img').attr('src');
let charsPath = '/characters/'
let targetAvatarImg = thumbURL.substring(thumbURL.lastIndexOf("=") + 1);
let avatarSrc = charsPath + targetAvatarImg;
if ($(this).parent().attr('is_user') == 'true') { //handle user avatars
$("#zoomed_avatar").attr('src', thumbURL);
} else if ($(this).parent().attr('is_system') == 'true') { //handle system avatars
$("#zoomed_avatar").attr('src', thumbURL);
} else if ($(this).parent().attr('is_user') == 'false') { //handle char avatars
$("#zoomed_avatar").attr('src', avatarSrc);
}
$('#avatar_zoom_popup').toggle();
if ($(this).parent().attr('is_user') == 'true') { //handle user avatars
$("#zoomed_avatar").attr('src', thumbURL);
} else if ($(this).parent().attr('is_system') == 'true') { //handle system avatars
$("#zoomed_avatar").attr('src', thumbURL);
} else if ($(this).parent().attr('is_user') == 'false') { //handle char avatars
$("#zoomed_avatar").attr('src', avatarSrc);
}
$('#avatar_zoom_popup').toggle();
} else { return; }
});
$(document).on('click', '#OpenAllWIEntries', function () {

View File

@ -3685,6 +3685,22 @@ body.noShadows * {
}
#avatar_zoom_popup {
min-width: 100px;
min-height: 100px;
max-height: 90vh;
max-width: 90vh;
width: calc((100vw - var(--sheldWidth)) /2);
position: absolute;
padding: 0;
filter: drop-shadow(2px 2px 2px #51515199);
z-index: 2;
overflow: hidden;
display: none;
bottom: 0;
aspect-ratio: 2 / 3;
}
body.waifuMode #avatar_zoom_popup {
min-width: 100px;
min-height: 100px;
max-height: 90vh;
@ -3718,7 +3734,24 @@ body.noShadows * {
@media screen and (max-width: 1000px) {
#avatar_zoom_popup {
min-width: 100px;
min-height: 100px;
max-height: 90vh;
max-width: 90vh;
width: calc((100vw - var(--sheldWidth)) /2);
position: absolute;
padding: 0;
filter: drop-shadow(2px 2px 2px #51515199);
z-index: 2;
overflow: hidden;
display: none;
left: 0;
right: 0;
margin: 0 auto;
top: 50px;
aspect-ratio: 2 / 3;
}
.mes img.img_extra {
max-width: 100%;
@ -3887,7 +3920,6 @@ body.noShadows * {
body.waifuMode #sheld {
height: 40svh;
top: 60svh;
/* align-items: end; */
bottom: 0 !important;
}