mirror of
https://github.com/vibegif/vibegif.lol.git
synced 2026-04-07 02:12:12 +00:00
Fix: Robust show/hide with flex support + display reset
This commit is contained in:
@@ -22,13 +22,17 @@ export function grabElements(ids = ELEMENT_IDS) {
|
||||
export function show(node) {
|
||||
if (!node) return;
|
||||
node.classList.remove('hidden');
|
||||
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) {
|
||||
|
||||
Reference in New Issue
Block a user