feat(workbench): expand prompt cards by default with collapsible toggle

This commit is contained in:
DemonGatanjieu
2026-09-04 14:50:28 +08:00
parent 3c29cc0142
commit 809c6124b7
2 changed files with 7 additions and 5 deletions
+5 -3
View File
@@ -474,10 +474,12 @@ function buildPromptsStation(posText, negText, fallbackPrompt) {
const expandBtn = document.createElement('button');
expandBtn.type = 'button';
expandBtn.className = 'anomalous-workbench-mini-action-btn';
expandBtn.textContent = t('materialExpandAll') || '展开';
expandBtn.textContent = t('materialCollapse') || (window.anomalous_browser_lang === 'zh' ? '收起' : 'Collapse');
expandBtn.onclick = () => {
const isExp = contentEl.classList.toggle('is-expanded');
expandBtn.textContent = isExp ? (t('materialCollapse') || '收起') : (t('materialExpandAll') || '展开');
expandBtn.textContent = isExp
? (t('materialCollapse') || (window.anomalous_browser_lang === 'zh' ? '收起' : 'Collapse'))
: (t('materialExpandAll') || (window.anomalous_browser_lang === 'zh' ? '展开全部' : 'Expand All'));
};
btns.appendChild(expandBtn);
}
@@ -485,7 +487,7 @@ function buildPromptsStation(posText, negText, fallbackPrompt) {
topBar.appendChild(btns);
card.appendChild(topBar);
const contentEl = text(card, 'div', promptStr, 'anomalous-workbench-prompt-content');
const contentEl = text(card, 'div', promptStr, 'anomalous-workbench-prompt-content is-expanded');
return card;
};
+2 -2
View File
@@ -6069,8 +6069,8 @@ dialog.anomalous-gallery-viewer::backdrop {
}
.anomalous-workbench-prompt-content.is-expanded {
max-height: 800px;
overflow-y: auto;
max-height: none;
overflow-y: visible;
}
/* Models & LoRA Section */