show prompt as text
This commit is contained in:
parent
476d8285f6
commit
6691595eaf
1 changed files with 34 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue