Skip to content

Commit

Permalink
Merge pull request #9 from chourmovs/beta
Browse files Browse the repository at this point in the history
9
  • Loading branch information
chourmovs authored Sep 1, 2024
2 parents 8c44db4 + 55b15a1 commit ec732f2
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions webapp/public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ <h1>Blissify Webapp</h1>
<form id="network-path-form">
<label for="network-path">Entrez le chemin du dossier réseau :</label>
<input type="text" id="network-path" name="network-path" placeholder="i.e. \\192.168.1.xxx/Music" required>
<button type="submit">Rechercher</button>
<button type="submit">Search</button>
</form>

<!-- <button onclick="searchMusic()">Rechercher Bibliothèque Musicale</button>
Expand Down Expand Up @@ -60,13 +60,24 @@ <h1>Blissify Webapp</h1>
event.preventDefault();
const networkPath = document.getElementById('network-path').value;

fetch(`/find-directory?path=${encodeURIComponent(networkPath)}`)
// Monter le partage NAS
fetch(`/mount-nas?path=${encodeURIComponent(networkPath)}`)
.then(response => response.text())
.then(data => {
document.getElementById('result').innerText = data;

// Lancer blissify init après le montage
fetch(`/run-blissify`)
.then(response => response.text())
.then(data => {
document.getElementById('result').innerText += `\n\n${data}`;
})
.catch(error => {
document.getElementById('result').innerText += `\nErreur lors de l'exécution de blissify : ${error}`;
});
})
.catch(error => {
document.getElementById('result').innerText = `Erreur: ${error}`;
document.getElementById('result').innerText = `Erreur lors du montage : ${error}`;
});
});

Expand Down

0 comments on commit ec732f2

Please sign in to comment.