Compare commits
3 commits
724d2af565
...
6691595eaf
| Author | SHA1 | Date | |
|---|---|---|---|
| 6691595eaf | |||
| 476d8285f6 | |||
| 14d79dc2de |
2 changed files with 44 additions and 2 deletions
11
config.jsonc
11
config.jsonc
|
|
@ -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
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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