Compare commits

...

3 commits

Author SHA1 Message Date
j
6691595eaf show prompt as text 2026-01-14 14:47:18 +00:00
j
476d8285f6 fix prompt 2026-01-14 14:46:22 +00:00
j
14d79dc2de key to adjust audio volume 2026-01-14 13:52:11 +00:00
2 changed files with 44 additions and 2 deletions

View file

@ -587,6 +587,15 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
"filter": true,
"sort": true
},
{
"id": "adjustvolume",
"title": "Adjust Volume",
"type": "string",
"columnWidth": 128,
"filter": false,
"find": false,
"sort": false
},
{
"id": "model",
"title": "Model",
@ -601,7 +610,7 @@ examples (config.SITENAME.jsonc) that are part of this pan.do/ra distribution.
"title": "Prompt",
"type": "text",
"columnWidth": 128,
"filter": true,
"filter": false,
"find": true,
"sort": false
},

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);
}