page parametres

This commit is contained in:
Grizouille
2025-11-08 17:43:18 +01:00
parent 933105b521
commit 45b442efcd
5 changed files with 77 additions and 35 deletions

View File

@@ -293,6 +293,25 @@ $(document).ready(function() {
});
// END DEEZER FAVORITE SONGS
$('#paramters').on('submit', function(e) {
e.preventDefault();
$.ajax({
url: deezer_downloader_api_root + '/save_config',
type: 'POST',
contentType: 'application/json', // essentiel pour Flask.get_json()
data: JSON.stringify({ dirPath: $('#param-directry-path').val(),
login: $('#param-login').val(),
password: $('#param-password').val()}),
success: function(response) {
$.jGrowl("Sauvegarder avec succès", { life: 4000 });
},
error: function(xhr) {
const err = xhr.responseJSON?.error || 'Erreur inconnue';
$('#result').css('color', 'red').text(err);
}
});
});
function show_tab(id_nav, id_content) {
// nav