mirror of
https://github.com/covidpass-org/covidpass.git
synced 2025-02-23 15:07:44 +01:00
Merge pull request #27 from Coteh/main
Fix bug preventing file selection on iPhone 6 iOS 12.5
This commit is contained in:
commit
36f7595fca
@ -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'}}
|
||||
/>
|
||||
|
@ -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> Vaccination Receipt</b></span></td>
|
||||
<td style={{fontSize: 20, width: 280}}><span style={{marginLeft: '11px'}}><b>Vaccination Receipt</b></span></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user