Added new provinces and states to the list of accepted regions
* Added links to NL and PEI proof-of-vaccination portals * Fixed Wallet and Pay buttons not looking disabled when inactive * Bumped version to 2.2.1 * Some dead code removal and warning cleanup * We need to find a better way to list regions - it's turning into an eternal run-on sentence, hard to identify supported regions
This commit is contained in:
parent
6c13b63798
commit
67a4a15007
|
@ -43,8 +43,10 @@ const options = [
|
|||
{ label: 'Alberta', value: 'https://covidrecords.alberta.ca/form'},
|
||||
{ label: 'British Columbia', value: 'https://www.healthgateway.gov.bc.ca/vaccinecard'},
|
||||
{ label: 'Ontario', value: 'https://covid19.ontariohealth.ca'},
|
||||
{ label: 'Newfoundland and Labrador', value: 'https://vaccineportal.nlchi.nl.ca/'},
|
||||
{ label: 'Northwest Territories', value: 'https://www.gov.nt.ca/covid-19/en/request/proof-vaccination'},
|
||||
{ label: 'Nova Scotia', value: 'https://novascotia.flow.canimmunize.ca/en/portal'},
|
||||
{ label: 'Prince Edward Island', value: 'https://pei.flow.canimmunize.ca/en/portal'},
|
||||
{ label: 'Québec', value: 'https://covid19.quebec.ca/PreuveVaccinale'},
|
||||
{ label: 'Saskatchewan', value: 'https://services.saskatchewan.ca/#/login'},
|
||||
{ label: 'Yukon', value: 'https://service.yukon.ca/forms/en/get-covid19-proof-of-vaccination'},
|
||||
|
@ -66,7 +68,6 @@ function Form(): JSX.Element {
|
|||
const [qrCode, setQrCode] = useState<Result>(undefined);
|
||||
const [file, setFile] = useState<File>(undefined);
|
||||
const [payloadBody, setPayloadBody] = useState<PayloadBody>(undefined);
|
||||
const [photoBlob, setPhotoBlob] = useState<Blob>(undefined);
|
||||
|
||||
const [saveLoading, setSaveLoading] = useState<boolean>(false);
|
||||
const [fileLoading, setFileLoading] = useState<boolean>(false);
|
||||
|
@ -186,7 +187,7 @@ function Form(): JSX.Element {
|
|||
inputFile.current.click();
|
||||
}
|
||||
|
||||
async function goToFAQ(e) {
|
||||
async function goToFAQ(e : any) {
|
||||
e.preventDefault();
|
||||
window.location.href = '/faq';
|
||||
}
|
||||
|
@ -313,18 +314,8 @@ function Form(): JSX.Element {
|
|||
try {
|
||||
if (payloadBody) {
|
||||
|
||||
let selectedReceipt;
|
||||
let filenameDetails = '';
|
||||
if (payloadBody.rawData.length > 0) {
|
||||
// This is an SHC receipt, so do our SHC thing
|
||||
selectedReceipt = payloadBody.shcReceipt;
|
||||
filenameDetails = selectedReceipt.cardOrigin.replace(' ', '-');
|
||||
} else {
|
||||
selectedReceipt = payloadBody.receipts[selectedDose];
|
||||
const vaxName = selectedReceipt.vaccineName.replace(' ', '-');
|
||||
const passDose = selectedReceipt.numDoses;
|
||||
filenameDetails = `${vaxName}-${passDose}`;
|
||||
}
|
||||
const selectedReceipt = payloadBody.shcReceipt;
|
||||
const filenameDetails = selectedReceipt.cardOrigin.replace(' ', '-');
|
||||
const passName = selectedReceipt.name.replace(' ', '-');
|
||||
const covidPassFilename = `grassroots-receipt-${passName}-${filenameDetails}.pkpass`;
|
||||
|
||||
|
@ -358,9 +349,9 @@ function Form(): JSX.Element {
|
|||
}
|
||||
|
||||
// Add Pass to Google Pay
|
||||
async function addToGooglePay() {
|
||||
async function addToGooglePay(e : any) {
|
||||
|
||||
event.preventDefault();
|
||||
e.preventDefault();
|
||||
setSaveLoading(true);
|
||||
|
||||
if (!file && !qrCode) {
|
||||
|
@ -371,15 +362,6 @@ function Form(): JSX.Element {
|
|||
|
||||
try {
|
||||
if (payloadBody) {
|
||||
|
||||
let selectedReceipt;
|
||||
if (payloadBody.rawData.length > 0) { // shc stuff
|
||||
const sortedKeys = Object.keys(payloadBody.shcReceipt.vaccinations).sort(); // pickup the last key in the receipt table
|
||||
const lastKey = sortedKeys[sortedKeys.length - 1];
|
||||
selectedReceipt = payloadBody.shcReceipt.vaccinations[lastKey];
|
||||
} else {
|
||||
selectedReceipt = payloadBody.receipts[selectedDose];
|
||||
}
|
||||
|
||||
console.log('> increment count');
|
||||
await incrementCount();
|
||||
|
@ -435,15 +417,13 @@ function Form(): JSX.Element {
|
|||
document.getElementById('shc-image-header').hidden = false;
|
||||
console.log('made canvas visible');
|
||||
|
||||
const newPhotoBlob = await Photo.generateSHCPass(payloadBody, shouldRegister);
|
||||
await Photo.generateSHCPass(payloadBody, shouldRegister);
|
||||
console.log('generated blob');
|
||||
setPhotoBlob(newPhotoBlob);
|
||||
}
|
||||
console.log('done photo render');
|
||||
} catch (e) {
|
||||
Sentry.captureException(e);
|
||||
|
||||
setPhotoBlob(undefined);
|
||||
setAddErrorMessage(e.message);
|
||||
}
|
||||
}
|
||||
|
@ -452,36 +432,7 @@ function Form(): JSX.Element {
|
|||
await renderPhoto(payloadBody, false);
|
||||
}
|
||||
|
||||
async function saveAsPhoto() {
|
||||
|
||||
setSaveLoading(true);
|
||||
|
||||
if (!file && !qrCode) {
|
||||
setAddErrorMessage('noFileOrQrCode');
|
||||
setSaveLoading(false);
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
// This is an SHC receipt, so do our SHC thing
|
||||
const selectedReceipt = payloadBody.shcReceipt;
|
||||
const filenameDetails = selectedReceipt.cardOrigin.replace(' ', '-');
|
||||
const passName = selectedReceipt.name.replace(' ', '-');
|
||||
const covidPassFilename = `grassroots-receipt-${passName}-${filenameDetails}.png`;
|
||||
|
||||
await incrementCount();
|
||||
|
||||
saveAs(photoBlob, covidPassFilename);
|
||||
|
||||
setSaveLoading(false);
|
||||
} catch (e) {
|
||||
Sentry.captureException(e);
|
||||
|
||||
setAddErrorMessage(e.message);
|
||||
setSaveLoading(false);
|
||||
}
|
||||
}
|
||||
const setDose = (e) => {
|
||||
const setDose = (e : any) => {
|
||||
setSelectedDose(e.target.value);
|
||||
}
|
||||
|
||||
|
@ -634,14 +585,15 @@ function Form(): JSX.Element {
|
|||
</div>
|
||||
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 gap-5 items-center justify-items-stretch">
|
||||
<button disabled={saveLoading} className=" bg-black outline-apple rounded-md" id="download" type="submit" value='applewallet' name='action'>
|
||||
<button disabled={saveLoading || isDisabledAppleWallet} id="download" type="submit" value='applewallet' name='action'
|
||||
className={'outline-apple rounded-md ' + ((!payloadBody || saveLoading || isDisabledAppleWallet)? 'bg-gray-300 cursor-not-allowed':'bg-black cursor-pointer')}>
|
||||
<div className="flex justify-center">
|
||||
<img style={{height: 40}} src="apple_wallet.svg" alt={t('index:addToWallet')}/>
|
||||
</div>
|
||||
</button>
|
||||
|
||||
<button id="addToGooglePay" type="button" disabled={saveLoading} value='gpay' name='action' onClick={addToGooglePay}
|
||||
className=" bg-black rounded-md">
|
||||
<button id="addToGooglePay" type="button" disabled={saveLoading || isDisabledGooglePay} value='gpay' name='action' onClick={addToGooglePay}
|
||||
className={'rounded-md ' + ((!payloadBody || saveLoading || isDisabledGooglePay)? 'bg-gray-300 cursor-not-allowed':'bg-black cursor-pointer')}>
|
||||
<div className="flex justify-center">
|
||||
<img style={{height: 40}} src="gpay_light.svg" alt={t('index:addToGooglePay')}/>
|
||||
</div>
|
||||
|
|
|
@ -32,7 +32,7 @@ function Page(props: PageProps): JSX.Element {
|
|||
<a href="https://github.com/billylo1/covidpass" className="underline">{t('common:gitHub')}</a>
|
||||
<a href="https://vaccine-ontario.ca" className="underline">{t('common:returnToMainSite')}</a>
|
||||
</nav>
|
||||
<div className="flex pt-4 flex-row space-x-4 justify-center text-md flex-wrap">Last updated: 2021-10-19 (v2.2.0)</div>
|
||||
<div className="flex pt-4 flex-row space-x-4 justify-center text-md flex-wrap">Last updated: 2021-10-23 (v2.2.1)</div>
|
||||
</footer>
|
||||
</main>
|
||||
</div>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "grassroots_covidpass",
|
||||
"version": "2.2.0",
|
||||
"version": "2.2.1",
|
||||
"author": "Billy Lo <billy@vaccine-ontario.ca>",
|
||||
"license": "MIT",
|
||||
"private": false,
|
||||
|
|
|
@ -42,8 +42,8 @@ function Index(): JSX.Element {
|
|||
}, []);
|
||||
|
||||
|
||||
const title = 'Grassroots - vaccination QR Code import for Apple and Android devices. Supports BC AB SK MB ON QC NS YK NT NY NJ CA LA VA HI UT DE';
|
||||
const description = 'Grassroots imports vaccination QR codes and stores them on Apple and Android devices in a convenient, secure, and privacy-respecting way. Supports SHC QR codes from BC AB SK MB ON QC NS YK NT NY NJ CA LA VA HI UT DE';
|
||||
const title = 'Grassroots - vaccination QR Code import for Apple and Android devices. Supports BC AB SK MB ON QC NS PE NL YK NT NY NJ CA LA VA HI UT KY OK NV NM DE';
|
||||
const description = 'Grassroots imports vaccination QR codes and stores them on Apple and Android devices in a convenient, secure, and privacy-respecting way. Supports SHC QR codes from BC AB SK MB ON QC NS PE NL YK NT NY NJ CA LA VA HI UT KY OK NV NM DE';
|
||||
|
||||
return (
|
||||
<>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
title: Vaccination Receipt to Mobile Wallets
|
||||
subtitle: This utility (created by volunteers) copies your proof-of-vaccination QR code into either Apple Wallet (for iOS 15+), Google Pay Wallet (for Android 8.1+), or a Photo pass (for all others) for easy access.
|
||||
subtitle2: We now support importing QR codes from Ontario, British Columbia, Québec, Alberta, Nova Scotia, Saskatchewan, Yukon, Northwest Territories, California, New York, Louisiana, New Jersey, Hawaii, Virginia, Utah, and Delaware!
|
||||
subtitle2: We now support importing QR codes from Ontario, British Columbia, Québec, Alberta, Nova Scotia, Saskatchewan, Yukon, Northwest Territories, Newfoundland and Labrador, Prince Edward Island, California, New York, Louisiana, New Jersey, Hawaii, Virginia, Utah, Kentucky, Oklahoma, New Mexico, Nevada, Connecticut, and Delaware!
|
||||
continueSpirit: Continuing the spirit of ❤️ @VaxHuntersCanada ❤️
|
||||
privacyPolicy: Privacy Policy
|
||||
gitHub: GitHub
|
||||
|
|
|
@ -28,7 +28,7 @@ familyA: Yes. You can save multiple Apple Wallet, Google Pay, or Photo cards on
|
|||
freeQ: Is this free and non-commercial?
|
||||
freeA: Similar to %s, there are no commercial interests. Just volunteers trying to do our part to help the community.
|
||||
otherProvincesQ: How about support for other provinces or US states?
|
||||
otherProvincesA: We now have support for Ontario, British Columbia, Québec, Alberta, Saskatchewan, Nova Scotia, Yukon, Northwest Territories, California, New York, New Jersey, Louisiana, Hawaii, Virginia, Utah, and Delaware QR codes. If you have a QR code that is not currently supported by our app, please contact us at %s
|
||||
otherProvincesA: We now have support for Ontario, British Columbia, Québec, Alberta, Saskatchewan, Nova Scotia, Yukon, Northwest Territories, Newfoundland and Labrador, Prince Edward Island, California, New York, New Jersey, Louisiana, Hawaii, Virginia, Utah, Kentucky, Oklahoma, New Mexico, Nevada, Connecticut, and Delaware QR codes. If you have a QR code that is not currently supported by our app, please contact us at %s
|
||||
appleWatchQ: How about Apple Watch?
|
||||
appleWatchA: If you have iCloud sync enabled, you will see the pass on the watch too. Please be aware though that the new QR codes may be too large to display accurately on older Apple Watches due to their screen size.
|
||||
whyQ: Why have we taken time to build this?
|
||||
|
|
|
@ -3,7 +3,7 @@ import { Integrations } from '@sentry/tracing';
|
|||
|
||||
export const initSentry = () => {
|
||||
SentryModule.init({
|
||||
release: 'grassroots_covidpass@2.2.0', // App version. Needs to be manually updated as we go unless we make the build smarter
|
||||
release: 'grassroots_covidpass@2.2.1', // App version. Needs to be manually updated as we go unless we make the build smarter
|
||||
dsn: 'https://7120dcf8548c4c5cb148cdde2ed6a778@o1015766.ingest.sentry.io/5981424',
|
||||
integrations: [
|
||||
new Integrations.BrowserTracing(),
|
||||
|
|
Loading…
Reference in New Issue