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