diff --git a/src/main/resources/static/css/qrstyle.css b/src/main/resources/static/css/qrstyle.css index 3889336f056126ea01d0f5611a8f30bc411a47c1..b0c851a93e488b09a7ebb4c36b09579ac7dedf88 100644 --- a/src/main/resources/static/css/qrstyle.css +++ b/src/main/resources/static/css/qrstyle.css @@ -1,4 +1,6 @@ /*style sheet for QR code - R Nute*/ +/*Modified from (https://www.geeksforgeeks.org/create-a-qr-code-scanner-or-reader-in-html-css-javascript/)*/ + body { display: flex; justify-content: center; diff --git a/src/main/resources/static/qr-scanner.html b/src/main/resources/static/qr-scanner.html index 34a00ba6f614201221baee42cda953c0c88a442f..707177753131b459e600b8699294bddefc4e73b1 100644 --- a/src/main/resources/static/qr-scanner.html +++ b/src/main/resources/static/qr-scanner.html @@ -1,4 +1,6 @@ <!--setup html page for QR codes - R Nute--> +<!--Modified from (https://www.geeksforgeeks.org/create-a-qr-code-scanner-or-reader-in-html-css-javascript/)--> + <!DOCTYPE html> <html lang="en"> <head> diff --git a/src/main/resources/static/scripts/qr-script.js b/src/main/resources/static/scripts/qr-script.js index 92ab7ddc54227f40a4130eb54e689e02feb3f61b..8a80c70e5720ff59670edf1794dbbbedc4cc19fe 100644 --- a/src/main/resources/static/scripts/qr-script.js +++ b/src/main/resources/static/scripts/qr-script.js @@ -1,5 +1,5 @@ //qr-script file - R Nute - +//Modified from (https://www.geeksforgeeks.org/create-a-qr-code-scanner-or-reader-in-html-css-javascript/) function domReady(fn){ if ( document.readyState === "complete" || @@ -14,6 +14,9 @@ domReady(function (message){ //if QR code found function onScanSuccess(decodeText, decodeResult){ alert("You have collected: " + decodeText, decodeResult); + // Open the result, what methods are available through the HTML5 Qr scanner node package? + // Record the result, see above. + // Get user and tie to user account, intergrate with database, retrieving and storing under user info. } let htmlscanner = new Html5QrcodeScanner( "qr-code-reader",