show prompt as text

This commit is contained in:
j 2026-01-14 14:47:18 +00:00
commit 6691595eaf

View file

@ -46,7 +46,8 @@ pandora.ui.infoView = function(data, isMixed) {
'duration', 'aspectratio', 'pixels', 'size', 'resolution',
'created', 'modified', 'accessed',
'random',
'numberoftags'
'numberoftags',
'prompt'
],
statisticsWidth = 128,
@ -289,6 +290,38 @@ pandora.ui.infoView = function(data, isMixed) {
.appendTo($text);
}
if (canEdit || data.prompt) {
$('<div>')
.append(
Ox.EditableContent({
clickLink: pandora.clickLink,
editable: canEdit,
format: function(value) {
return value.replace(
/<img src=/g,
'<img style="float: left; max-width: 256px; max-height: 256px; margin: 0 16px 16px 0" src='
);
},
maxHeight: Infinity,
placeholder: formatLight(Ox._( isMixed.prompt ? 'Mixed Prompt' : 'No Prompt')),
tooltip: canEdit ? pandora.getEditTooltip() : '',
type: 'textarea',
value: data.prompt || ''
})
.css(css)
.css({
marginTop: '12px',
overflow: 'hidden'
})
.bindEvent({
submit: function(event) {
editMetadata('prompt', event.value);
}
})
)
.appendTo($text);
}
if (data.type?.join('').includes('ai:')) {
$('<div>').addClass('ai-preview').appendTo($text);
}