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

@@ -83,4 +83,16 @@ h3, th, td {
.btn {
color: white !important;
}
form {
background-color: #292929;
border-radius: 8px;
padding: 30px;
max-width: 500px;
margin: 60px auto;
box-shadow: 0 0 15px rgba(0,0,0,0.5);
}
form label {
color: white;
}

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