diff --git a/src/lib/Finger.svelte b/src/lib/Finger.svelte new file mode 100644 index 0000000..bf76bae --- /dev/null +++ b/src/lib/Finger.svelte @@ -0,0 +1,32 @@ + + +
+ Drag link to tab bar or click to copy link +
+ + + + diff --git a/src/lib/images/pointer-finger.svg b/src/lib/images/pointer-finger.svg new file mode 100644 index 0000000..206fb76 --- /dev/null +++ b/src/lib/images/pointer-finger.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 2160ba9..e664fd0 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -3,6 +3,7 @@ import { base } from '$app/paths'; import { encodeURLSafe } from '@stablelib/base64'; + import Finger from '$lib/Finger.svelte'; /** * @type {string} @@ -27,6 +28,8 @@ */ let hash; let integrity; + // Test whether it's isSafari + let isSafari = false; onMount(async () => { const name = 'innerApp.js'; @@ -55,7 +58,8 @@ el_link.href = dataUrl; // FIXME: This device detection is quite fragile - const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); + // const isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); + isSafari = navigator.userAgent.includes('Safari') && !navigator.userAgent.includes('Chrome'); const isAndroid = navigator.userAgent.toLowerCase().indexOf('android') > -1; // if safari simply click the link @@ -82,15 +86,24 @@ }); - - - - -

Welcome to Secure Bookmark Warp Wallet

-Drag me into tab bar - - -
- +
+

Welcome to Integrity Apps, a Secure Bookmark Webpage

+ {#if !isSafari} + + + {/if} + Drag me into tab bar + + + +

How does this work?

+

+ When you copy/paste or drag the link into the address bar, the app will be loaded. This is a + secure way to load the app because the app code cannot change behind your back. Once the data + URL has loaded, you can bookmark it and use it in the future. +

+