page parametres
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user