Compare commits
No commits in common. "b8eae1fb54b51f2a3fd700c5cce08c828bee218a" and "64f473d214c687b6fbf1f120ab102ed001723c38" have entirely different histories.
b8eae1fb54
...
64f473d214
|
@ -191,9 +191,6 @@ function Form(): JSX.Element {
|
|||
const passBlob = new Blob([pass], {type: "application/vnd.apple.pkpass"});
|
||||
saveAs(passBlob, 'covid.pkpass');
|
||||
setLoading(false);
|
||||
|
||||
var scrollingElement = (document.scrollingElement || document.body);
|
||||
scrollingElement.scrollTop = scrollingElement.scrollHeight;
|
||||
} catch (e) {
|
||||
setErrorMessage(e.message);
|
||||
setLoading(false);
|
||||
|
|
|
@ -2,33 +2,17 @@ import {serverSideTranslations} from 'next-i18next/serverSideTranslations';
|
|||
|
||||
import React, {useEffect, useState} from "react";
|
||||
import QRCode from "react-qr-code";
|
||||
|
||||
import Card from '../components/Card';
|
||||
import Logo from "../components/Logo";
|
||||
|
||||
function Pass(): JSX.Element {
|
||||
const [fragment, setFragment] = useState<string>(undefined);
|
||||
|
||||
function closeViewer() {
|
||||
setFragment(undefined);
|
||||
window.location.replace('/');
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
const rawFragment = window.location.hash.substring(1);
|
||||
const decodedFragment = Buffer.from(rawFragment, 'base64').toString();
|
||||
setFragment(decodedFragment);
|
||||
|
||||
document.addEventListener('visibilitychange', () => {
|
||||
if (document.hidden) {
|
||||
closeViewer();
|
||||
}
|
||||
});
|
||||
|
||||
window.addEventListener('blur', closeViewer);
|
||||
window.addEventListener('beforeunload', closeViewer);
|
||||
window.addEventListener('pagehide', closeViewer);
|
||||
}, []);
|
||||
}, [fragment]);
|
||||
|
||||
return (
|
||||
<div className="py-6 flex flex-col space-y-5 items-center">
|
||||
|
|
|
@ -152,7 +152,7 @@ function Privacy(): JSX.Element {
|
|||
<li>
|
||||
{t('privacy:appleSync')}:
|
||||
|
||||
<a href="https://www.apple.com/legal/privacy/en-ww/" className="underline">
|
||||
<a href="https://www.apple.com/legal/privacy/en-ww/privacy.tsx" className="underline">
|
||||
{t('common:privacyPolicy')}
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -25,4 +25,4 @@ privacyPolicy: Πολιτική Απορρήτου
|
|||
createdOnDevice: Δημιουργείται στη συσκευή σας
|
||||
openSourceTransparent: Ανοιχτού κώδικα και διαφανής
|
||||
hostedInEU: Φιλοξενείται στην ΕΕ
|
||||
share: Κοινοποιήστε το
|
||||
share: Συστήσει
|
|
@ -3,9 +3,9 @@ import {Constants} from "./constants";
|
|||
import {COLORS} from "./colors";
|
||||
|
||||
enum CertificateType {
|
||||
Vaccination = 'Vaccination Pass',
|
||||
Test = 'Test Pass',
|
||||
Recovery = 'Recovery Pass',
|
||||
Vaccination = 'Vaccination Card',
|
||||
Test = 'Test Certificate',
|
||||
Recovery = 'Recovery Certificate',
|
||||
}
|
||||
|
||||
enum TextAlignment {
|
||||
|
|
Loading…
Reference in New Issue