mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
avatarpopup now draggable
This commit is contained in:
@@ -2084,6 +2084,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="avatar_zoom_popup">
|
<div id="avatar_zoom_popup">
|
||||||
|
<div id="avatar_zoom_popupheader" class="fa-solid fa-grip drag-grabber"></div>
|
||||||
<img id="zoomed_avatar" src="">
|
<img id="zoomed_avatar" src="">
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
@@ -5398,19 +5398,7 @@ $(document).ready(function () {
|
|||||||
} 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);
|
||||||
}
|
}
|
||||||
|
|
||||||
let avatarPopper = Popper.createPopper(document.getElementById('top-bar'), document.getElementById('avatar_zoom_popup'), {
|
|
||||||
placement: 'bottom',
|
|
||||||
});
|
|
||||||
|
|
||||||
setTimeout(function () {
|
|
||||||
avatarPopper.update();
|
|
||||||
$('#avatar_zoom_popup').toggle();
|
$('#avatar_zoom_popup').toggle();
|
||||||
}, 100);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '#OpenAllWIEntries', function () {
|
$(document).on('click', '#OpenAllWIEntries', function () {
|
||||||
|
@@ -403,6 +403,7 @@ function OpenNavPanels() {
|
|||||||
dragElement(document.getElementById("sheld"));
|
dragElement(document.getElementById("sheld"));
|
||||||
dragElement(document.getElementById("left-nav-panel"));
|
dragElement(document.getElementById("left-nav-panel"));
|
||||||
dragElement(document.getElementById("right-nav-panel"));
|
dragElement(document.getElementById("right-nav-panel"));
|
||||||
|
dragElement(document.getElementById("avatar_zoom_popup"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@@ -501,6 +501,13 @@ function resetMovablePanels() {
|
|||||||
document.getElementById("expression-holder").style.bottom = '';
|
document.getElementById("expression-holder").style.bottom = '';
|
||||||
document.getElementById("expression-holder").style.height = '';
|
document.getElementById("expression-holder").style.height = '';
|
||||||
document.getElementById("expression-holder").style.width = '';
|
document.getElementById("expression-holder").style.width = '';
|
||||||
|
|
||||||
|
document.getElementById("avatar_zoom_popup").style.top = '';
|
||||||
|
document.getElementById("avatar_zoom_popup").style.left = '';
|
||||||
|
document.getElementById("avatar_zoom_popup").style.right = '';
|
||||||
|
document.getElementById("avatar_zoom_popup").style.bottom = '';
|
||||||
|
document.getElementById("avatar_zoom_popup").style.height = '';
|
||||||
|
document.getElementById("avatar_zoom_popup").style.width = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(() => {
|
$(document).ready(() => {
|
||||||
|
@@ -3685,11 +3685,18 @@ body.noShadows * {
|
|||||||
#avatar_zoom_popup {
|
#avatar_zoom_popup {
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
display: none;
|
display: none;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
margin: 0 auto;
|
||||||
|
top: 50px;
|
||||||
|
position: absolute;
|
||||||
|
width: 400px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#zoomed_avatar {
|
#zoomed_avatar {
|
||||||
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;
|
max-width: 70svh;
|
||||||
|
Reference in New Issue
Block a user