Opera8 commited on
Commit
b1f8020
·
verified ·
1 Parent(s): 543c2f6

Update templates/rvc-voice.html

Browse files
Files changed (1) hide show
  1. templates/rvc-voice.html +22 -4
templates/rvc-voice.html CHANGED
@@ -146,7 +146,7 @@
146
  <div class="container py-5">
147
 
148
  <div class="info-hero">
149
- <h1 class="fw-black mb-3"><i class="fas fa-magic me-2"></i>استودیو تغییر صدای آلفا (مبتنی بر کلود گیت‌هاب)</h1>
150
  <p class="mb-4" style="line-height: 1.8; opacity: 0.9;">
151
  به ابزار پیشرفته تغییر صدا (RVC) خوش آمدید. اکنون درخواست‌های شما بدون اشغال پردازنده کلاینت، بر روی گیت‌هاب اکشنز ابری توزیع می‌شود و پس از تولید نهایی به هاست بازگردانده خواهد شد.
152
  </p>
@@ -354,7 +354,23 @@
354
  }
355
 
356
  function getJobs() { return JSON.parse(localStorage.getItem('alpha_voice_jobs_g_v1') || '[]'); }
357
- function saveJob(job) { const jobs = getJobs(); jobs.unshift(job); localStorage.setItem('alpha_voice_jobs_g_v1', JSON.stringify(jobs)); renderHistory(); }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
358
  function updateJobStatus(id, status, filename, log) {
359
  const jobs = getJobs(); const idx = jobs.findIndex(j => j.id === id);
360
  if (idx !== -1) {
@@ -362,6 +378,7 @@
362
  localStorage.setItem('alpha_voice_jobs_g_v1', JSON.stringify(jobs)); renderHistory();
363
  }
364
  }
 
365
  function deleteJob(id) {
366
  const jobs = getJobs().filter(j => j.id !== id);
367
  localStorage.setItem('alpha_voice_jobs_g_v1', JSON.stringify(jobs));
@@ -434,7 +451,7 @@
434
  <div class="ps-4">
435
  <div class="d-flex justify-content-between align-items-center">
436
  <div>
437
- <div class="fw-bold">پروژه #${job.id.substring(3, 9)}</div>
438
  <div class="small text-muted">${job.date}</div>
439
  </div>
440
  ${badge}
@@ -534,7 +551,8 @@
534
  const data = await response.json();
535
 
536
  if (data.status === 'success') {
537
- startPolling(currentRunId);
 
538
  clearAudioInput();
539
  } else {
540
  throw new Error(data.message || 'خطا در تخصیص صف.');
 
146
  <div class="container py-5">
147
 
148
  <div class="info-hero">
149
+ <h1 class="fw-black mb-3"><i class="fas fa-magic me-2"></i>استودیو تغییر صدای هوشمند آلفا</h1>
150
  <p class="mb-4" style="line-height: 1.8; opacity: 0.9;">
151
  به ابزار پیشرفته تغییر صدا (RVC) خوش آمدید. اکنون درخواست‌های شما بدون اشغال پردازنده کلاینت، بر روی گیت‌هاب اکشنز ابری توزیع می‌شود و پس از تولید نهایی به هاست بازگردانده خواهد شد.
152
  </p>
 
354
  }
355
 
356
  function getJobs() { return JSON.parse(localStorage.getItem('alpha_voice_jobs_g_v1') || '[]'); }
357
+
358
+ function saveJob(job) {
359
+ const jobs = getJobs();
360
+ jobs.unshift(job);
361
+ localStorage.setItem('alpha_voice_jobs_g_v1', JSON.stringify(jobs));
362
+ renderHistory();
363
+ }
364
+
365
+ function renameJobId(oldId, newId) {
366
+ const jobs = getJobs();
367
+ const idx = jobs.findIndex(j => j.id === oldId);
368
+ if (idx !== -1) {
369
+ jobs[idx].id = newId;
370
+ localStorage.setItem('alpha_voice_jobs_g_v1', JSON.stringify(jobs));
371
+ }
372
+ }
373
+
374
  function updateJobStatus(id, status, filename, log) {
375
  const jobs = getJobs(); const idx = jobs.findIndex(j => j.id === id);
376
  if (idx !== -1) {
 
378
  localStorage.setItem('alpha_voice_jobs_g_v1', JSON.stringify(jobs)); renderHistory();
379
  }
380
  }
381
+
382
  function deleteJob(id) {
383
  const jobs = getJobs().filter(j => j.id !== id);
384
  localStorage.setItem('alpha_voice_jobs_g_v1', JSON.stringify(jobs));
 
451
  <div class="ps-4">
452
  <div class="d-flex justify-content-between align-items-center">
453
  <div>
454
+ <div class="fw-bold">پروژه #${job.id.substring(0, 6)}</div>
455
  <div class="small text-muted">${job.date}</div>
456
  </div>
457
  ${badge}
 
551
  const data = await response.json();
552
 
553
  if (data.status === 'success') {
554
+ renameJobId(currentRunId, data.run_id);
555
+ startPolling(data.run_id);
556
  clearAudioInput();
557
  } else {
558
  throw new Error(data.message || 'خطا در تخصیص صف.');