Elias207 commited on
Commit
44115eb
·
verified ·
1 Parent(s): 948031a

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +10 -7
index.html CHANGED
@@ -97,6 +97,8 @@
97
  .status-message.success { border-left: 4px solid var(--success-color); color: var(--success-color); }
98
  .status-message.error { border-left: 4px solid var(--danger-color); color: var(--danger-color); }
99
  .status-icon { width: 18px; height: 18px; }
 
 
100
  #aiLoader { align-items: center; justify-content: center; }
101
  .generator-container { position: relative; width: 400px; max-width: 100%; height: 300px; border: 2px solid #38bdf8; border-radius: 20px; overflow: hidden; box-shadow: 0 0 40px rgba(56, 189, 248, 0.3); animation: pulse-loader 5s infinite cubic-bezier(0.4, 0, 0.6, 1); background-color: #161b22; color: #f0f6fc; }
102
  @keyframes pulse-loader { 0% { box-shadow: 0 0 40px rgba(56, 189, 248, 0.3); } 50% { box-shadow: 0 0 60px rgba(56, 189, 248, 0.7); } 100% { box-shadow: 0 0 40px rgba(56, 189, 248, 0.3); } }
@@ -114,6 +116,7 @@
114
  .text-overlay { position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%); font-size: 24px; font-weight: 700; text-shadow: 0 0 20px rgba(56, 189, 248, 0.8); animation: glow-text 7s infinite ease-in-out; font-family: var(--app-font); width: 90%; text-align: center;}
115
  @keyframes glow-text { 0% { opacity: 0.7; } 50% { opacity: 1; } 100% { opacity: 0.7; } }
116
  .progress-bar { position: absolute; bottom: 0; left: 0; width: 0%; height: 6px; background: linear-gradient(to right, #38bdf8, #bb86fc, #facc15); transition: width 0.4s ease; }
 
117
  #outputVideo { width: 100%; max-width: 500px; border-radius: var(--radius-input); margin: 1rem auto; display: block; background-color: #000; box-shadow: var(--shadow-md); }
118
  #finalSeed { text-align: center; color: var(--text-tertiary); font-size: 0.85rem; margin-top: 1rem; }
119
  .video-controls { display: flex; justify-content: center; gap: 1rem; margin-top: 1.5rem; }
@@ -296,7 +299,7 @@
296
  generateButton.disabled = true;
297
  resultContainer.classList.add('active');
298
  statusSection.classList.add('active');
299
- aiLoader.style.display = 'flex'; // Use flex for centering
300
  setAiLoaderText("تلاش مجدد...");
301
  addStatusMessage('تلاش مجدد...', 'info', true);
302
 
@@ -351,7 +354,7 @@
351
  <h2><span class="icon">💡</span> راهنمای رفع محدودیت ویدیو</h2>
352
  <div class="error-content">
353
  <strong class="error-message-title">ارور محدودیت استفاده از GPU</strong>
354
- <p>مدل‌های هوش مصنوعی برای اجرا به کارت‌های گرافیک بسیار قدرتمند نیاز دارند که این امر گاهی محدودیت‌هایی جی پی یو را در استفاده از آن‌ها ایجاد می‌کند. با این حال، خبر خوب این است که این محدودیت‌ها با استفاده از یک ترفند ساده قابل رفع هستند.</p>
355
  <p><strong>برای رفع محدودیت هر بار اینگونه عمل کنید:</strong></p>
356
  <ul>
357
  <li>اگر از اینترنت سیم‌کارت استفاده می‌کنید، فیلترشکن خود را حتما خاموش کنید.</li>
@@ -370,7 +373,7 @@
370
  document.getElementById('gpuErrorRetryBtn').addEventListener('click', retryLastAttempt);
371
  } else {
372
  criticalErrorSection.innerHTML = `
373
- <div style="color: var(--danger-color); font-weight: 500; margin-bottom: 1.5rem; line-height: 1.6;"><p>${message}</p></div>
374
  <div class="video-controls">
375
  <button id="simpleErrorGoBackBtn" class="video-button">بازگشت</button>
376
  <button id="simpleErrorRetryBtn" class="video-button primary">تلاش مجدد</button>
@@ -521,7 +524,7 @@
521
  async function uploadImageToServerForVideoOriginal(file) {
522
  addStatusMessage('آماده‌سازی تصویر برای آپلود...', 'info', true);
523
  setAiLoaderText("در حال آماده سازی تصویر...");
524
- aiLoader.style.display = 'flex';
525
 
526
  const uploadId = generateRandomHash(12);
527
  const formData = new FormData();
@@ -555,7 +558,7 @@
555
  async function submitToVideoQueue(payload) {
556
  addStatusMessage('ارسال درخواست ساخت ویدیو...', 'info', true);
557
  setAiLoaderText("در حال ارسال درخواست ساخت ویدیو...");
558
- aiLoader.style.display = 'flex';
559
  try {
560
  const response = await fetch(`${VIDEO_SPACE_URL_BASE}/queue/join`, {
561
  method: 'POST',
@@ -573,7 +576,7 @@
573
  function listenForVideoResults(eventId) {
574
  addStatusMessage('در حال ساخت ویدیو...', 'info', true);
575
  setAiLoaderText("هوش مصنوعی در حال پردازش...");
576
- aiLoader.style.display = 'flex';
577
  hideCriticalError();
578
  statusSection.classList.add('active');
579
  outputSection.classList.remove('active');
@@ -730,7 +733,7 @@
730
  generateButton.disabled = true;
731
  resultContainer.classList.add('active');
732
  statusSection.classList.add('active');
733
- aiLoader.style.display = 'flex'; // Use flex for centering
734
  if(loaderProgressBar) loaderProgressBar.style.animation = '';
735
  outputSection.classList.remove('active');
736
 
 
97
  .status-message.success { border-left: 4px solid var(--success-color); color: var(--success-color); }
98
  .status-message.error { border-left: 4px solid var(--danger-color); color: var(--danger-color); }
99
  .status-icon { width: 18px; height: 18px; }
100
+
101
+ /* --- LOADING ANIMATION STYLES (ORIGINAL AND UNCHANGED) --- */
102
  #aiLoader { align-items: center; justify-content: center; }
103
  .generator-container { position: relative; width: 400px; max-width: 100%; height: 300px; border: 2px solid #38bdf8; border-radius: 20px; overflow: hidden; box-shadow: 0 0 40px rgba(56, 189, 248, 0.3); animation: pulse-loader 5s infinite cubic-bezier(0.4, 0, 0.6, 1); background-color: #161b22; color: #f0f6fc; }
104
  @keyframes pulse-loader { 0% { box-shadow: 0 0 40px rgba(56, 189, 248, 0.3); } 50% { box-shadow: 0 0 60px rgba(56, 189, 248, 0.7); } 100% { box-shadow: 0 0 40px rgba(56, 189, 248, 0.3); } }
 
116
  .text-overlay { position: absolute; top: 45%; left: 50%; transform: translate(-50%, -50%); font-size: 24px; font-weight: 700; text-shadow: 0 0 20px rgba(56, 189, 248, 0.8); animation: glow-text 7s infinite ease-in-out; font-family: var(--app-font); width: 90%; text-align: center;}
117
  @keyframes glow-text { 0% { opacity: 0.7; } 50% { opacity: 1; } 100% { opacity: 0.7; } }
118
  .progress-bar { position: absolute; bottom: 0; left: 0; width: 0%; height: 6px; background: linear-gradient(to right, #38bdf8, #bb86fc, #facc15); transition: width 0.4s ease; }
119
+
120
  #outputVideo { width: 100%; max-width: 500px; border-radius: var(--radius-input); margin: 1rem auto; display: block; background-color: #000; box-shadow: var(--shadow-md); }
121
  #finalSeed { text-align: center; color: var(--text-tertiary); font-size: 0.85rem; margin-top: 1rem; }
122
  .video-controls { display: flex; justify-content: center; gap: 1rem; margin-top: 1.5rem; }
 
299
  generateButton.disabled = true;
300
  resultContainer.classList.add('active');
301
  statusSection.classList.add('active');
302
+ aiLoader.style.display = 'block'; // بازگردانی به حالت اولیه
303
  setAiLoaderText("تلاش مجدد...");
304
  addStatusMessage('تلاش مجدد...', 'info', true);
305
 
 
354
  <h2><span class="icon">💡</span> راهنمای رفع محدودیت ویدیو</h2>
355
  <div class="error-content">
356
  <strong class="error-message-title">ارور محدودیت استفاده از GPU</strong>
357
+ <p>مدل‌های هوش مصنوعی برای اجرا به کارت‌های گرافیک بسیار قدرمند نیاز دارند که این امر گاهی محدودیت‌هایی جی پی یو را در استفاده از آن‌ها ایجاد می‌کند. با این حال، خبر خوب این است که این محدودیت‌ها با استفاده از یک ترفند ساده قابل رفع هستند.</p>
358
  <p><strong>برای رفع محدودیت هر بار اینگونه عمل کنید:</strong></p>
359
  <ul>
360
  <li>اگر از اینترنت سیم‌کارت استفاده می‌کنید، فیلترشکن خود را حتما خاموش کنید.</li>
 
373
  document.getElementById('gpuErrorRetryBtn').addEventListener('click', retryLastAttempt);
374
  } else {
375
  criticalErrorSection.innerHTML = `
376
+ <div id="criticalErrorMessage" style="color: var(--danger-color); font-weight: 500; margin-bottom: 1.5rem; line-height: 1.6;"><p>${message}</p></div>
377
  <div class="video-controls">
378
  <button id="simpleErrorGoBackBtn" class="video-button">بازگشت</button>
379
  <button id="simpleErrorRetryBtn" class="video-button primary">تلاش مجدد</button>
 
524
  async function uploadImageToServerForVideoOriginal(file) {
525
  addStatusMessage('آماده‌سازی تصویر برای آپلود...', 'info', true);
526
  setAiLoaderText("در حال آماده سازی تصویر...");
527
+ aiLoader.style.display = 'block';
528
 
529
  const uploadId = generateRandomHash(12);
530
  const formData = new FormData();
 
558
  async function submitToVideoQueue(payload) {
559
  addStatusMessage('ارسال درخواست ساخت ویدیو...', 'info', true);
560
  setAiLoaderText("در حال ارسال درخواست ساخت ویدیو...");
561
+ aiLoader.style.display = 'block';
562
  try {
563
  const response = await fetch(`${VIDEO_SPACE_URL_BASE}/queue/join`, {
564
  method: 'POST',
 
576
  function listenForVideoResults(eventId) {
577
  addStatusMessage('در حال ساخت ویدیو...', 'info', true);
578
  setAiLoaderText("هوش مصنوعی در حال پردازش...");
579
+ aiLoader.style.display = 'block';
580
  hideCriticalError();
581
  statusSection.classList.add('active');
582
  outputSection.classList.remove('active');
 
733
  generateButton.disabled = true;
734
  resultContainer.classList.add('active');
735
  statusSection.classList.add('active');
736
+ aiLoader.style.display = 'block'; // بازگردانی به حالت اولیه
737
  if(loaderProgressBar) loaderProgressBar.style.animation = '';
738
  outputSection.classList.remove('active');
739