1
0
Fork 0
forked from bton/matekasse
matekasse/templates/addtag.html

26 lines
1 KiB
HTML
Raw Normal View History

2023-05-31 18:33:45 +00:00
<!DOCTYPE html>
<html lang="en">
2023-07-05 17:29:42 +00:00
<script src="/socket.io.js" integrity="sha512-q/dWJ3kcmjBLU4Qc47E4A9kTB4m3wuTY7vkFJDTZKjTs8jhyGQnaUrxa0Ytd0ssMZhbNua9hE+E7Qv1j+DyZwA==" crossorigin="anonymous"></script>
2023-05-31 18:33:45 +00:00
<script type="text/javascript" charset="utf-8">
var socket = io();
var user = {{ user }}
socket.on('connect', function() {
socket.emit('addtag', {data: user});
});
socket.on("busy", function(){
document.write('<p>the nfc reader is busy at the moment. Pleas Wait ...</p>')
socket.emit('addtag', {data: user})
});
socket.on("wait", function(){
2023-05-31 20:29:47 +00:00
document.write('<p>Pleas hold your tag on to the nfc reader</p>')
2023-05-31 18:33:45 +00:00
});
socket.on("error", function(data) {
alert(data)
window.location="http://matekasse.server.c3h/"
2023-05-31 18:33:45 +00:00
});
socket.on("finished", function(data){
alert(data)
window.location="http://matekasse.server.c3h/"
2023-05-31 18:33:45 +00:00
});
</script>
</html>