Re-working the API library functions and files
This commit is contained in:
@@ -79,7 +79,7 @@ onMount(() => {
|
||||
// handle_start_qr_scanning();
|
||||
// }
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
@@ -107,13 +107,13 @@ var successCallback = function(error: any) {
|
||||
// document.getElementById('qr_scanner_viewfinder').classList.remove('d_none');
|
||||
} else {
|
||||
console.log('html5_qr_code not found. Creating new Html5Qrcode...');
|
||||
debug_info = 'html5_qr_code not found. Creating new Html5Qrcode...';
|
||||
debug_info = 'html5_qr_code not found. Creating new Html5Qrcode...';
|
||||
}
|
||||
|
||||
html5_qr_code = new Html5Qrcode(
|
||||
'qr_scanner_viewfinder', { formatsToSupport: [ Html5QrcodeSupportedFormats.QR_CODE ] }
|
||||
);
|
||||
|
||||
|
||||
debug_info = 'new Html5Qrcode for element id=qr_scanner_viewfinder';
|
||||
|
||||
|
||||
@@ -213,14 +213,14 @@ async function handle_start_qr_scanning() {
|
||||
// );
|
||||
// } else {
|
||||
// console.log('html5_qr_code not found. Creating new Html5Qrcode...');
|
||||
// debug_info = 'html5_qr_code not found. Creating new Html5Qrcode...';
|
||||
// debug_info = 'html5_qr_code not found. Creating new Html5Qrcode...';
|
||||
|
||||
// html5_qr_code = new Html5Qrcode(
|
||||
// 'qr_scanner_viewfinder', { formatsToSupport: [ Html5QrcodeSupportedFormats.QR_CODE ] }
|
||||
// );
|
||||
// }
|
||||
|
||||
debug_info = 'Check the state and start if not started...';
|
||||
debug_info = 'Check the state and start if not started...';
|
||||
|
||||
let current_state = await html5_qr_code.getState()
|
||||
|
||||
@@ -262,7 +262,7 @@ async function handle_start_qr_scanning() {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -295,7 +295,7 @@ async function handle_stop_qr_scanning() {
|
||||
console.log('html5_qr_code object found. Nothing to stop?');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
let state = html5_qr_code.getState();
|
||||
console.log('html5_qr_code state:', state);
|
||||
|
||||
@@ -542,7 +542,7 @@ function send_init_confirm_email(subject, message) {
|
||||
|
||||
</form>
|
||||
{:else}
|
||||
<button on:click={() =>
|
||||
<button on:click={() =>
|
||||
{
|
||||
handle_stop_qr_scanning();
|
||||
show_qr_manual_entry=true;
|
||||
|
||||
Reference in New Issue
Block a user