mirror of
https://github.com/MasterAcnolo/Freedom-Loader.git
synced 2026-07-29 18:25:47 +02:00
Refactor: Translate all comms in English
This commit is contained in:
@@ -43,12 +43,12 @@ function loadTheme() {
|
||||
applyTheme(savedTheme);
|
||||
themeSelect.value = savedTheme;
|
||||
} else {
|
||||
applyTheme("dark"); // thème par défaut
|
||||
applyTheme("dark");
|
||||
themeSelect.value = "dark";
|
||||
}
|
||||
}
|
||||
|
||||
// Quand l'utilisateur change le thème depuis le select
|
||||
// When the user changes the theme from the select
|
||||
themeSelect.addEventListener("change", (event) => {
|
||||
const selectedTheme = event.target.value;
|
||||
if (themes[selectedTheme]) {
|
||||
|
||||
@@ -4,7 +4,7 @@ const button = form.querySelector("button");
|
||||
|
||||
form.addEventListener("submit", async (e) => {
|
||||
e.preventDefault();
|
||||
button.disabled = true; // Empêche les clics multiples
|
||||
button.disabled = true; // Avoid multiple clicks
|
||||
statusDiv.textContent = "Download in progress...";
|
||||
|
||||
const formData = new FormData(form);
|
||||
|
||||
@@ -43,7 +43,7 @@ async function init() {
|
||||
|
||||
const url = urlInput.value.trim();
|
||||
|
||||
// Si champ vide -> reset total
|
||||
// IF field empty -> total reset
|
||||
if (!url || url.length < 2) {
|
||||
infoDiv.innerHTML = "";
|
||||
infoDiv.classList.remove("visible", "playlist-mode");
|
||||
@@ -58,7 +58,7 @@ async function init() {
|
||||
const data = await fetchVideoInfo(url);
|
||||
loaderBox.style.display = "none";
|
||||
|
||||
// Gestion des erreurs
|
||||
|
||||
if (data.error) {
|
||||
infoDiv.innerHTML = `
|
||||
<div style="
|
||||
@@ -139,7 +139,7 @@ async function init() {
|
||||
`;
|
||||
});
|
||||
|
||||
// Gestion du bouton copier
|
||||
// Copy Button
|
||||
listDiv.addEventListener("click", (event) => {
|
||||
if (event.target.classList.contains("copy-btn") || event.target.closest(".copy-btn")) {
|
||||
const btn = event.target.closest(".copy-btn") || event.target;
|
||||
|
||||
@@ -30,7 +30,7 @@ function resetProgress() {
|
||||
speedElement.style.display = "none";
|
||||
}
|
||||
|
||||
// Connexion SSE
|
||||
// SSE Connexion
|
||||
const evtSource = new EventSource("/download/progress");
|
||||
evtSource.onmessage = e => {
|
||||
if (e.data === "reset") {
|
||||
@@ -49,10 +49,10 @@ evtSource.onmessage = e => {
|
||||
|
||||
if (!isNaN(percent)) {
|
||||
updateProgress(percent);
|
||||
window.electronAPI.setProgress(percent); // update barre des tâches
|
||||
window.electronAPI.setProgress(percent); // Update Task Bar
|
||||
if (percent >= 100) setTimeout(() => {
|
||||
resetProgress();
|
||||
window.electronAPI.setProgress(-1); // retire la barre
|
||||
window.electronAPI.setProgress(-1); // Remove the bar
|
||||
}, 500);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -15,7 +15,7 @@ function closePanel() {
|
||||
settingsPanel.style.display = "none";
|
||||
}
|
||||
|
||||
// charge les features
|
||||
|
||||
async function loadSettings() {
|
||||
const features = await window.electronAPI.getFeatures();
|
||||
|
||||
@@ -33,7 +33,7 @@ async function loadSettings() {
|
||||
});
|
||||
}
|
||||
|
||||
// ouvrir le JSON
|
||||
// Open The JSON
|
||||
document.getElementById("open-json-btn").addEventListener("click", () => {
|
||||
window.topbarAPI.openConfig(); // ton IPC existant
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user