From ca47e1de448e49b266bf3e3ac7fd56e3773eb832 Mon Sep 17 00:00:00 2001 From: Billy Lo Date: Sun, 24 Oct 2021 21:38:21 -0400 Subject: [PATCH 1/3] commented out fastlink feature for now on main branch so we can continue to deploy with worrying about traffic management --- components/Form.tsx | 30 ++++-------------------------- src/payload.ts | 12 +++++++----- 2 files changed, 11 insertions(+), 31 deletions(-) diff --git a/components/Form.tsx b/components/Form.tsx index e80f34a..ddf31d0 100644 --- a/components/Form.tsx +++ b/components/Form.tsx @@ -126,7 +126,10 @@ function Form(): JSX.Element { _setFileErrorMessages([]); checkBrowserType(); const payloadBody = await getPayload(selectedFile); - await createDataUrlForDisplay(selectedFile); + + //TODO: feature flagging + + // await createDataUrlForDisplay(selectedFile); await renderPhoto(payloadBody); } }); @@ -143,32 +146,7 @@ function Form(): JSX.Element { const buffer = Buffer.from(await new Response(file).arrayBuffer()); let dataUrl = `data:${file.type};base64,${buffer.toString("base64")}`; localStorage.setItem('pdfDataUrl', dataUrl); - // dataUrl = 'https://apple.com'; - - - // let script = `function debugBase64(base64URL){ - // var win = window.open(); - // win.document.write(''); - // } - // debugBase64('${dataUrl}'); - // `; - - // let hrefValue = `javascript:${script};` - - // let aElement = document.createElement('a') - // let textNode = document.createTextNode('Click me'); - // aElement.appendChild(textNode); - // aElement.title = 'Click me'; - // aElement.setAttribute('id', 'mylink'); - // aElement.setAttribute('href', hrefValue) - // // aElement.setAttribute('download', file.name) - // // aElement.setAttribute('target', '_blank') - - // document.getElementById('wrapper').appendChild(aElement); - - // console.log('*** outerHTML ***'); - // console.log(document.getElementById('wrapper').outerHTML) } } diff --git a/src/payload.ts b/src/payload.ts index f1b4e37..00104b5 100644 --- a/src/payload.ts +++ b/src/payload.ts @@ -89,11 +89,13 @@ export class Payload { console.log('*** attributedValue ***'); console.log(attributedValue); - this.generic.backFields.push({ - key: "original", - label: "Original receipt (saved locally in Safari)", - attributedValue: attributedValue - }); + //TODO: feature flagging + + // this.generic.backFields.push({ + // key: "original", + // label: "Original receipt (saved locally in Safari)", + // attributedValue: attributedValue + // }); } } } From af8f2271da8c14994960a10d770de26e08a5b17f Mon Sep 17 00:00:00 2001 From: Billy Lo Date: Sun, 24 Oct 2021 21:41:11 -0400 Subject: [PATCH 2/3] turn off dark mode for now until fix --- tailwind.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tailwind.config.js b/tailwind.config.js index 42becec..1e0d037 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,7 +1,9 @@ module.exports = { mode: 'jit', purge: ['./pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'], - darkMode: 'media', + darkMode: 'class', // manual for now until layout fix + // darkMode: 'media', + theme: { extend: { outline: { From 9a6770bfd8344f6dc6398ee4fb4665177bcff2fd Mon Sep 17 00:00:00 2001 From: Billy Lo Date: Sun, 24 Oct 2021 23:07:54 -0400 Subject: [PATCH 3/3] typo on field value on the back of the card --- src/payload.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/payload.ts b/src/payload.ts index 00104b5..9a29cf0 100644 --- a/src/payload.ts +++ b/src/payload.ts @@ -143,7 +143,7 @@ function processSHCReceipt(receipt: SHCReceipt, generic: PassDictionary) { { key: 'vaccine' + (i+1), label: `#${i+1} ${receipt.vaccinations[i].vaccineName}`, - value: `{receipt.vaccinations[i].vaccinationDate} in ${receipt.vaccinations[i].organization}` + value: `${receipt.vaccinations[i].vaccinationDate} in ${receipt.vaccinations[i].organization}` } )