mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
avatar popups enabled on mobile normal mode
This commit is contained in:
@ -5458,22 +5458,22 @@ $(document).ready(function () {
|
|||||||
|
|
||||||
$(document).on('click', '.mes .avatar', function () {
|
$(document).on('click', '.mes .avatar', function () {
|
||||||
|
|
||||||
if (window.innerWidth > 1000 || $('body').hasClass('waifuMode')) {
|
//if (window.innerWidth > 1000 || $('body').hasClass('waifuMode')) {
|
||||||
|
|
||||||
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);
|
||||||
let avatarSrc = charsPath + targetAvatarImg;
|
let avatarSrc = charsPath + targetAvatarImg;
|
||||||
if ($(this).parent().attr('is_user') == 'true') { //handle user avatars
|
if ($(this).parent().attr('is_user') == 'true') { //handle user avatars
|
||||||
$("#zoomed_avatar").attr('src', thumbURL);
|
$("#zoomed_avatar").attr('src', thumbURL);
|
||||||
} else if ($(this).parent().attr('is_system') == 'true') { //handle system avatars
|
} else if ($(this).parent().attr('is_system') == 'true') { //handle system avatars
|
||||||
$("#zoomed_avatar").attr('src', thumbURL);
|
$("#zoomed_avatar").attr('src', thumbURL);
|
||||||
} else if ($(this).parent().attr('is_user') == 'false') { //handle char avatars
|
} else if ($(this).parent().attr('is_user') == 'false') { //handle char avatars
|
||||||
$("#zoomed_avatar").attr('src', avatarSrc);
|
$("#zoomed_avatar").attr('src', avatarSrc);
|
||||||
}
|
}
|
||||||
$('#avatar_zoom_popup').toggle();
|
$('#avatar_zoom_popup').toggle();
|
||||||
|
|
||||||
} else { return; }
|
//} else { return; }
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '#OpenAllWIEntries', function () {
|
$(document).on('click', '#OpenAllWIEntries', function () {
|
||||||
|
@ -3967,6 +3967,12 @@ body.waifuMode #avatar_zoom_popup {
|
|||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body:not(.waifuMode) #avatar_zoom_popup {
|
||||||
|
z-index: 999;
|
||||||
|
width: fit-content;
|
||||||
|
max-height: calc(60svh - 60px);
|
||||||
|
}
|
||||||
|
|
||||||
body.waifuMode #avatar_zoom_popup {
|
body.waifuMode #avatar_zoom_popup {
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
max-height: calc(60svh - 60px);
|
max-height: calc(60svh - 60px);
|
||||||
|
Reference in New Issue
Block a user