Merge pull request #27 from Coteh/main

Fix bug preventing file selection on iPhone 6 iOS 12.5
This commit is contained in:
Ryan Slobojan 2021-10-04 17:21:40 -04:00 committed by GitHub
commit 36f7595fca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -96,7 +96,7 @@ function Form(): JSX.Element {
// Add event listener to listen for file change events
useEffect(() => {
if (inputFile && inputFile.current) {
inputFile.current.addEventListener('input', () => {
inputFile.current.addEventListener('change', () => {
let selectedFile = inputFile.current.files[0];
if (selectedFile !== undefined) {
setFileLoading(true);
@ -442,7 +442,7 @@ function Form(): JSX.Element {
<input type='file'
id='file'
accept="application/pdf,image/png"
accept="application/pdf,.png"
ref={inputFile}
style={{display: 'none'}}
/>

View File

@ -48,7 +48,7 @@ function Page(props: PageProps): JSX.Element {
<tbody>
<tr>
<td><img src='shield4.svg' width='50' height='50' /></td>
<td style={{fontSize: 20, width: 280}}><span><b>&nbsp;&nbsp;Vaccination Receipt</b></span></td>
<td style={{fontSize: 20, width: 280}}><span style={{marginLeft: '11px'}}><b>Vaccination Receipt</b></span></td>
</tr>
</tbody>
</table>

View File

@ -1,5 +1,5 @@
import {PayloadBody, Receipt, HashTable} from "./payload";
import * as PdfJS from 'pdfjs-dist'
import * as PdfJS from 'pdfjs-dist/legacy/build/pdf'
import jsQR, {QRCode} from "jsqr";
import { getCertificatesInfoFromPDF } from "@ninja-labs/verify-pdf"; // ES6
import {COLORS} from "./colors";