Fix: Robust show/hide with flex support + display reset

This commit is contained in:
2026-03-21 01:41:53 -07:00
parent 42fb286ef0
commit ac7e209505

View File

@@ -22,13 +22,17 @@ export function grabElements(ids = ELEMENT_IDS) {
export function show(node) {
if (!node) return;
node.classList.remove('hidden');
node.style.display = '';
if (node.classList.contains('flex')) {
node.style.display = 'flex';
} else {
node.style.display = '';
}
}
export function hide(node) {
if (!node) return;
node.classList.add('hidden');
node.style.display = '';
node.style.display = 'none';
}
export function setProgress(el, pct, text) {
@@ -70,7 +74,7 @@ export function showResult(el, blobUrl, filename = 'vibegif.gif') {
export function hideResult(el) {
if (!el.resultArea) return;
el.resultArea.classList.add('hidden');
el.resultArea.style.display = '';
el.resultArea.style.display = 'none';
}
export function setGenerating(el, active) {