bibibi12345 commited on
Commit
6c627b7
·
1 Parent(s): 32708f9
Files changed (2) hide show
  1. static/script.js +18 -7
  2. static/style.css +5 -3
static/script.js CHANGED
@@ -477,22 +477,33 @@ async function uploadImageToFal(imageData, apiKey, imageIndex, totalImages, actu
477
  function updateUploadProgress(completed, total, message) {
478
  const progressFill = document.getElementById('uploadProgressFill');
479
  const progressText = document.getElementById('uploadProgressText');
 
480
 
481
- if (progressFill && progressText) {
482
  const percentage = Math.round((completed / total) * 100);
483
  progressFill.style.width = `${percentage}%`;
484
  progressText.textContent = `${message} (${percentage}%)`;
485
 
486
- // Add animation class
487
  if (percentage === 100) {
488
  progressFill.classList.add('complete');
 
 
489
  setTimeout(() => {
490
- const container = document.getElementById('uploadProgressContainer');
491
- if (container) {
492
- container.style.opacity = '0';
493
- setTimeout(() => container.remove(), 500);
494
- }
 
 
 
 
 
495
  }, 1500);
 
 
 
496
  }
497
  }
498
  }
 
477
  function updateUploadProgress(completed, total, message) {
478
  const progressFill = document.getElementById('uploadProgressFill');
479
  const progressText = document.getElementById('uploadProgressText');
480
+ const container = document.getElementById('uploadProgressContainer');
481
 
482
+ if (progressFill && progressText && container) {
483
  const percentage = Math.round((completed / total) * 100);
484
  progressFill.style.width = `${percentage}%`;
485
  progressText.textContent = `${message} (${percentage}%)`;
486
 
487
+ // Add animation class on completion
488
  if (percentage === 100) {
489
  progressFill.classList.add('complete');
490
+
491
+ // Wait briefly to show completion state, then fade out
492
  setTimeout(() => {
493
+ // Add transition for smooth fade
494
+ container.style.transition = 'opacity 0.5s ease';
495
+ container.style.opacity = '0';
496
+
497
+ // Remove from DOM after fade completes
498
+ setTimeout(() => {
499
+ if (container.parentNode) {
500
+ container.parentNode.removeChild(container);
501
+ }
502
+ }, 500);
503
  }, 1500);
504
+ } else {
505
+ // Ensure visible if not complete
506
+ container.style.opacity = '1';
507
  }
508
  }
509
  }
static/style.css CHANGED
@@ -989,11 +989,12 @@ body {
989
  /* Global upload progress container (top-level) */
990
  .upload-progress-container {
991
  margin-top: 12px;
992
- background: rgba(99,102,241,0.08);
993
- border: 1px solid rgba(124,58,237,0.20);
994
  border-radius: 10px;
995
  padding: 10px 12px;
996
  box-shadow: var(--shadow-soft);
 
997
  }
998
 
999
  .upload-progress-bar {
@@ -1020,7 +1021,8 @@ body {
1020
  .upload-progress-text {
1021
  margin-top: 8px;
1022
  font-size: 0.85rem;
1023
- color: rgba(255,255,255,0.9);
 
1024
  }
1025
 
1026
  /* Individual image upload status (mini) */
 
989
  /* Global upload progress container (top-level) */
990
  .upload-progress-container {
991
  margin-top: 12px;
992
+ background: rgba(55, 48, 163, 0.8); /* Deeper purple background for better contrast */
993
+ border: 1px solid rgba(124,58,237,0.6);
994
  border-radius: 10px;
995
  padding: 10px 12px;
996
  box-shadow: var(--shadow-soft);
997
+ color: white; /* Ensure text is white for readability */
998
  }
999
 
1000
  .upload-progress-bar {
 
1021
  .upload-progress-text {
1022
  margin-top: 8px;
1023
  font-size: 0.85rem;
1024
+ color: white; /* Set to white explicitly */
1025
+ font-weight: 600;
1026
  }
1027
 
1028
  /* Individual image upload status (mini) */