Zoomed Avatars back to reg. mobile 🦀

This commit is contained in:
RossAscends
2023-06-30 12:59:40 +09:00
parent 3353fe572c
commit e6761f7293
3 changed files with 49 additions and 30 deletions

View File

@ -7838,13 +7838,13 @@ $(document).ready(function () {
$(document).on('click', '.mes .avatar', function () {
console.log(isMobile());
console.log($('body').hasClass('waifuMode'));
//console.log(isMobile());
//console.log($('body').hasClass('waifuMode'));
if (isMobile() === true && !$('body').hasClass('waifuMode')) {
/* if (isMobile() === true && !$('body').hasClass('waifuMode')) {
console.debug('saw mobile regular mode, returning');
return;
} else { console.debug('saw valid env for zoomed display') }
} else { console.debug('saw valid env for zoomed display') } */
let thumbURL = $(this).children('img').attr('src');
let charsPath = '/characters/'

View File

@ -297,13 +297,13 @@ function toggleWaifu() {
function switchWaifuMode() {
$("body").toggleClass("waifuMode", power_user.waifuMode);
$("#waifuMode").prop("checked", power_user.waifuMode);
if (isMobile() && !$('body').hasClass('waifuMode')) {
console.debug('saw mobile regular mode, removing ZoomedAvatars');
if ($('.zoomed_avatar[forChar]').length) {
$('.zoomed_avatar[forChar]').remove();
}
return;
}
/* if (isMobile() && !$('body').hasClass('waifuMode')) {
console.debug('saw mobile regular mode, removing ZoomedAvatars');
if ($('.zoomed_avatar[forChar]').length) {
$('.zoomed_avatar[forChar]').remove();
}
return;
} */
scrollChatToBottom();
}

View File

@ -1923,9 +1923,9 @@ grammarly-extension {
padding: 5px;
}
#kobold_order > div {
#kobold_order>div {
padding: 5px;
padding-left: 25px;
padding-left: 30px;
width: 100%;
border-radius: 5px;
color: var(--SmartThemeBodyColor);
@ -1937,13 +1937,13 @@ grammarly-extension {
user-select: none;
}
#kobold_order > div:hover {
#kobold_order>div:hover {
background-color: var(--grey30a);
}
#kobold_order > div::after {
#kobold_order>div::after {
content: "☰";
left: 5px;
left: 8px;
position: absolute;
}
@ -4475,23 +4475,22 @@ body.waifuMode .zoomed_avatar {
min-width: 100% !important;
}
.zoomed_avatar {
body:not(.waifuMode) .zoomed_avatar {
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;
z-index: 30;
overflow: hidden;
display: none;
left: 0;
right: 0;
margin: 0 auto;
top: 50px;
aspect-ratio: 2 / 3;
width: fit-content;
max-height: calc(60svh - 60px);
max-width: 90svw;
}
.world_entry_thin_controls,
@ -4717,13 +4716,6 @@ body.waifuMode .zoomed_avatar {
object-fit: cover;
}
body:not(.waifuMode) .zoomed_avatar {
display: none;
/* z-index: 999;
width: fit-content;
max-height: calc(60svh - 60px); */
}
body.waifuMode .zoomed_avatar {
width: fit-content;
max-height: calc(60svh - 60px);
@ -4754,9 +4746,36 @@ body.waifuMode .zoomed_avatar {
top: unset;
bottom: unset;
}
body:not(.waifuMode) .zoomed_avatar {
width: fit-content;
max-height: calc(60svh - 60px);
max-width: 90svw;
}
}
@media screen and (max-width: 450px) {
body:not(.waifuMode) .zoomed_avatar {
min-width: 100px;
min-height: 100px;
max-height: 50vh;
max-width: 50vh;
width: 50vw;
position: absolute;
padding: 0;
filter: drop-shadow(2px 2px 2px #51515199);
z-index: 30;
overflow: hidden;
display: none;
left: 0;
right: 0;
margin: 0 auto;
top: 50px;
aspect-ratio: 2 / 3;
}
.drawer25pWidth {
flex-basis: max(calc(100% / 2 - 10px), 180px);
}
@ -4982,4 +5001,4 @@ body.waifuMode .zoomed_avatar {
background-color: var(--SmartThemeBlurTintColor);
text-align: center;
line-height: 14px;
}
}