diff --git a/public/.well-known/apple-app-site-association b/public/.well-known/apple-app-site-association new file mode 100644 index 0000000..98b29ce --- /dev/null +++ b/public/.well-known/apple-app-site-association @@ -0,0 +1,14 @@ +{ + "applinks": { + "apps": [], + "details": [ + { + "appID": "REPLACE_WITH_APPLE_TEAM_ID.eu.protom.sattle", + "paths": ["*"] + } + ] + }, + "webcredentials": { + "apps": ["REPLACE_WITH_APPLE_TEAM_ID.eu.protom.sattle"] + } +} diff --git a/public/.well-known/assetlinks.json b/public/.well-known/assetlinks.json new file mode 100644 index 0000000..3d2c304 --- /dev/null +++ b/public/.well-known/assetlinks.json @@ -0,0 +1,12 @@ +[ + { + "relation": ["delegate_permission/common.handle_all_urls"], + "target": { + "namespace": "android_app", + "package_name": "eu.protom.sattle", + "sha256_cert_fingerprints": [ + "REPLACE_WITH_RELEASE_KEYSTORE_SHA256_CERT_FINGERPRINT" + ] + } + } +] diff --git a/quasar.config.ts b/quasar.config.ts index 306fb85..3a8d7c0 100644 --- a/quasar.config.ts +++ b/quasar.config.ts @@ -11,7 +11,7 @@ export default defineConfig((ctx) => { // app boot file (/src/boot) // --> boot files are part of "main.js" // https://v2.quasar.dev/quasar-cli-vite/boot-files - boot: ['i18n', 'kit-fetch', 'wallet'], + boot: ['i18n', 'kit-fetch', 'wallet', 'deeplinks'], // https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#css css: ['app.scss'], diff --git a/src-pwa/manifest.json b/src-pwa/manifest.json index bddc296..da12a61 100644 --- a/src-pwa/manifest.json +++ b/src-pwa/manifest.json @@ -5,6 +5,12 @@ "id": "sattle", "display_override": ["fullscreen", "minimal-ui"], "display": "standalone", + "protocol_handlers": [ + { + "protocol": "web+lightning", + "url": "/?uri=%s" + } + ], "icons": [ { "src": "icons/icon-128x128.png", diff --git a/src/boot/deeplinks.ts b/src/boot/deeplinks.ts new file mode 100644 index 0000000..76862d2 --- /dev/null +++ b/src/boot/deeplinks.ts @@ -0,0 +1,16 @@ +import { defineBoot } from '#q-app'; + +import { initDeepLinks } from '@/capabilities/deepLinks'; + +// Deep-link bootstrap (capabilities/deepLinks.ts): native appUrlOpen / +// cold-start launch URLs and the PWA protocol-handler ?uri= landing all +// funnel into pendingExternalInput; the home screen consumes it and opens +// the matching receive/pay dialog. Every accepted link routes home first - +// the dialogs live there. +export default defineBoot(({ router }) => { + void initDeepLinks(() => { + void router.push('/').catch(() => { + // already on '/' - a redundant navigation is not an error + }); + }); +}); diff --git a/src/pages/IndexPage.vue b/src/pages/IndexPage.vue index a6ac40c..78e423f 100644 --- a/src/pages/IndexPage.vue +++ b/src/pages/IndexPage.vue @@ -6,9 +6,7 @@ class="sattle-card full-width q-mt-xl q-pa-lg text-center welcome-card" >
Welcome to sattle
-
- A simple wallet for Lightning bearer notes. -
+
A simple wallet for Lightning bearer notes.
-
- Locking in {{ wallet.lockWarningSecondsLeft }}s -
+
Locking in {{ wallet.lockWarningSecondsLeft }}s