Spaces:
Running
Running
Update static/script.js
Browse files- static/script.js +12 -6
static/script.js
CHANGED
|
@@ -470,12 +470,18 @@ function loadResumerPage() {
|
|
| 470 |
const data = await response.json();
|
| 471 |
|
| 472 |
if (data.translated_text) {
|
| 473 |
-
|
| 474 |
-
|
| 475 |
-
|
| 476 |
-
|
| 477 |
-
|
| 478 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 479 |
resultElement.innerText = "❌ Translation not available.";
|
| 480 |
}
|
| 481 |
} catch (error) {
|
|
|
|
| 470 |
const data = await response.json();
|
| 471 |
|
| 472 |
if (data.translated_text) {
|
| 473 |
+
resultContainer.innerHTML = `
|
| 474 |
+
<h3 style="text-align: center; font-size: 1.5rem; font-weight: bold; color: black;">📝 Translation :</h3>
|
| 475 |
+
<br>
|
| 476 |
+
<p style="text-align: center; font-size: 1.2rem; font-weight: bold; color: black;">${data.translated_text}</p>
|
| 477 |
+
`;
|
| 478 |
+
|
| 479 |
+
// Stocker le texte traduit pour le téléchargement
|
| 480 |
+
resultContainer.dataset.translatedText = data.translated_text;
|
| 481 |
+
|
| 482 |
+
// Afficher les options de téléchargement
|
| 483 |
+
document.getElementById("downloadSection").style.display = "block";
|
| 484 |
+
} else {
|
| 485 |
resultElement.innerText = "❌ Translation not available.";
|
| 486 |
}
|
| 487 |
} catch (error) {
|