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) {
|
export function show(node) {
|
||||||
if (!node) return;
|
if (!node) return;
|
||||||
node.classList.remove('hidden');
|
node.classList.remove('hidden');
|
||||||
|
if (node.classList.contains('flex')) {
|
||||||
|
node.style.display = 'flex';
|
||||||
|
} else {
|
||||||
node.style.display = '';
|
node.style.display = '';
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export function hide(node) {
|
export function hide(node) {
|
||||||
if (!node) return;
|
if (!node) return;
|
||||||
node.classList.add('hidden');
|
node.classList.add('hidden');
|
||||||
node.style.display = '';
|
node.style.display = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
export function setProgress(el, pct, text) {
|
export function setProgress(el, pct, text) {
|
||||||
@@ -70,7 +74,7 @@ export function showResult(el, blobUrl, filename = 'vibegif.gif') {
|
|||||||
export function hideResult(el) {
|
export function hideResult(el) {
|
||||||
if (!el.resultArea) return;
|
if (!el.resultArea) return;
|
||||||
el.resultArea.classList.add('hidden');
|
el.resultArea.classList.add('hidden');
|
||||||
el.resultArea.style.display = '';
|
el.resultArea.style.display = 'none';
|
||||||
}
|
}
|
||||||
|
|
||||||
export function setGenerating(el, active) {
|
export function setGenerating(el, active) {
|
||||||
|
|||||||
Reference in New Issue
Block a user