mirror of
https://github.com/Starlio-app/Starlio-web.git
synced 2025-02-22 18:33:10 +03:00
Added creation of a shortcut on the desktop
This commit is contained in:
parent
d0496c5fdf
commit
3f51438c24
3 changed files with 107 additions and 0 deletions
20
web/static/scripts/createLabel.js
Normal file
20
web/static/scripts/createLabel.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
let button = document.querySelector("#createLabelButton");
|
||||
button.addEventListener("click", function() {
|
||||
$.ajax({
|
||||
url: "http://localhost:8080/api/create/label",
|
||||
type: "POST",
|
||||
success: function(data) {
|
||||
if(data.status) {
|
||||
$(".toast-body").text(data.message);
|
||||
let toastLiveExample = document.getElementById('liveToast');
|
||||
let toast = new bootstrap.Toast(toastLiveExample);
|
||||
toast.show();
|
||||
} else {
|
||||
$(".toast-body").text("An error occurred while creating the label.");
|
||||
let toastLiveExample = document.getElementById('liveToast');
|
||||
let toast = new bootstrap.Toast(toastLiveExample);
|
||||
toast.show();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
Loading…
Add table
Reference in a new issue