matekasse/templates/addtag.html
2023-07-05 19:30:57 +02:00

26 lines
No EOL
1,013 B
HTML

<!DOCTYPE html>
<html lang="en">
<script src="/socket.io.js" integrity="sha512-q/Qght8UqVOucUncwXfeU2awmurGzNkJHiQZJGwYn8P81G/HO1CzuehO4vmUqky05JniIw5iIRwjohKcCf8+vrdA=="></script>
<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(){
document.write('<p>Pleas hold your tag on to the nfc reader</p>')
});
socket.on("error", function(data) {
alert(data)
window.location="http://matekasse.server.c3h/"
});
socket.on("finished", function(data){
alert(data)
window.location="http://matekasse.server.c3h/"
});
</script>
</html>