Display prompts for enlarged images

This commit is contained in:
Cohee
2023-10-22 00:39:11 +03:00
parent 81921bcd77
commit c49f898886
2 changed files with 11 additions and 2 deletions

View File

@ -6083,6 +6083,7 @@ function enlargeMessageImage() {
const mesId = mesBlock.attr('mesid');
const message = chat[mesId];
const imgSrc = message?.extra?.image;
const title = message?.extra?.title;
if (!imgSrc) {
return;
@ -6091,7 +6092,11 @@ function enlargeMessageImage() {
const img = document.createElement('img');
img.classList.add('img_enlarged');
img.src = imgSrc;
callPopup(img.outerHTML, 'text', '', { wide: true, large: true });
const imgContainer = $('<div><pre><code></code></pre></div>');
imgContainer.prepend(img);
imgContainer.addClass('img_enlarged_container');
imgContainer.find('code').text(title);
callPopup(imgContainer, 'text', '', { wide: true, large: true });
}
function updateAlternateGreetingsHintVisibility(root) {