Display prompts for enlarged images
This commit is contained in:
parent
81921bcd77
commit
c49f898886
|
@ -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) {
|
||||
|
|
|
@ -279,6 +279,11 @@ table.responsiveTable {
|
|||
font-weight: bold;
|
||||
}
|
||||
|
||||
.img_enlarged_container {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
.img_enlarged_container pre code,
|
||||
.mes_text pre code {
|
||||
position: relative;
|
||||
display: block;
|
||||
|
@ -3058,7 +3063,6 @@ a {
|
|||
.img_enlarged {
|
||||
max-width: 100%;
|
||||
max-height: 100%;
|
||||
padding: 10px 0;
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue