QR code viewer and content improvements
This commit is contained in:
parent
931b0806f9
commit
b8eae1fb54
|
@ -11,7 +11,7 @@ function Pass(): JSX.Element {
|
|||
|
||||
function closeViewer() {
|
||||
setFragment(undefined);
|
||||
window.location.href = '/';
|
||||
window.location.replace('/');
|
||||
}
|
||||
|
||||
useEffect(() => {
|
||||
|
@ -19,12 +19,6 @@ function Pass(): JSX.Element {
|
|||
const decodedFragment = Buffer.from(rawFragment, 'base64').toString();
|
||||
setFragment(decodedFragment);
|
||||
|
||||
window.location.replace('#');
|
||||
if (typeof window.history.replaceState == 'function') {
|
||||
const href = window.location.href;
|
||||
history.replaceState({}, '', href.slice(0, href.lastIndexOf('/')));
|
||||
}
|
||||
|
||||
document.addEventListener('visibilitychange', () => {
|
||||
if (document.hidden) {
|
||||
closeViewer();
|
||||
|
@ -32,6 +26,8 @@ function Pass(): JSX.Element {
|
|||
});
|
||||
|
||||
window.addEventListener('blur', closeViewer);
|
||||
window.addEventListener('beforeunload', closeViewer);
|
||||
window.addEventListener('pagehide', closeViewer);
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
|
|
@ -152,7 +152,7 @@ function Privacy(): JSX.Element {
|
|||
<li>
|
||||
{t('privacy:appleSync')}:
|
||||
|
||||
<a href="https://www.apple.com/legal/privacy/en-ww/privacy.tsx" className="underline">
|
||||
<a href="https://www.apple.com/legal/privacy/en-ww/" className="underline">
|
||||
{t('common:privacyPolicy')}
|
||||
</a>
|
||||
</li>
|
||||
|
|
|
@ -3,9 +3,9 @@ import {Constants} from "./constants";
|
|||
import {COLORS} from "./colors";
|
||||
|
||||
enum CertificateType {
|
||||
Vaccination = 'Vaccination Card',
|
||||
Test = 'Test Certificate',
|
||||
Recovery = 'Recovery Certificate',
|
||||
Vaccination = 'Vaccination Pass',
|
||||
Test = 'Test Pass',
|
||||
Recovery = 'Recovery Pass',
|
||||
}
|
||||
|
||||
enum TextAlignment {
|
||||
|
|
Loading…
Reference in New Issue