This commit is contained in:
2023-02-03 11:35:07 +01:00
parent 5aa076e769
commit 9c17e1508d
40 changed files with 3539 additions and 5 deletions

View File

@ -112,13 +112,15 @@ h1 {
#aj {
width: 50%;
margin-bottom: 15px;
}
#imgToReplace {
margin-top: 20px;
width: 50%;
display: none;
}
.btn {
margin: 5px 0;
}
}

View File

@ -49,8 +49,9 @@
<button class="btn btn-primary mx-auto d-block" id="takePicture">Camera</button>
<button class="btn btn-secondary mx-auto d-block" id="getPosition">Position</button>
<button class="btn btn-info mx-auto d-block" id="getCon">Est connecté ?</button>
<button class="btn btn-danger mx-auto d-block" id="getNotif">Notif</button>
<div class="camera">
<img src="" alt=" " class="mx-auto d-block" id="imgToReplace">
<img src="" alt=" " class="mx-auto d-block imgh" id="imgToReplace">
</div>
</div>

View File

@ -47,12 +47,17 @@ function onDeviceReady() {
});
document.addEventListener("offline", decoNet, false);
document.getElementById("getNotif").addEventListener("click", (e) => {
sendnotif();
});
}
function sucessCallbackImage(imageData) {
//alert("Zipp is best princess !");
var image = document.getElementById('imgToReplace') ;
image.style.display = "block";
image.src = "data:image/jpeg;base64," + imageData;
}
@ -100,3 +105,14 @@ function decoNet() {
btn.classList.add("btn-danger");
}
function sendnotif() {
navigator.notification.alert(
"Applejack is best pony !",
alertDismissed, // callback
);
}
function alertDismissed() {
}