- {qrUrl ? (
+ {qrUri ? (
-
+
) : null}
diff --git a/frontend/lib/i18n/locales/ar/translation.json b/frontend/lib/i18n/locales/ar/translation.json
index d48e64c..a04e1d3 100644
--- a/frontend/lib/i18n/locales/ar/translation.json
+++ b/frontend/lib/i18n/locales/ar/translation.json
@@ -2172,7 +2172,15 @@
"bookTitle": "حجز موعد",
"bookDesc": "جدول زيارة مع فريق الرعاية الخاص بك.",
"resultsTitle": "عرض نتائجي",
- "resultsDesc": "تحقّق من الزيارات القادمة وما إذا كانت النتائج جاهزة."
+ "resultsDesc": "تحقّق من الزيارات القادمة وما إذا كانت النتائج جاهزة.",
+ "walletTitle": "ربط محفظتي",
+ "walletDesc": "استخدم تطبيق temetro لحجز المواعيد وعرض النتائج بنفسك."
+ },
+ "wallet": {
+ "title": "اربط محفظتك",
+ "subtitle": "امسح هذا الرمز بتطبيق محفظة temetro لربطه بهذه العيادة.",
+ "error": "تعذّر تحميل رمز الربط. الرجاء سؤال مكتب الاستقبال.",
+ "hint": "بعد الربط، يمكنك حجز المواعيد وعرض النتائج من هاتفك."
},
"field": {
"name": "الاسم الكامل",
diff --git a/frontend/lib/i18n/locales/de/translation.json b/frontend/lib/i18n/locales/de/translation.json
index f860e76..52ee262 100644
--- a/frontend/lib/i18n/locales/de/translation.json
+++ b/frontend/lib/i18n/locales/de/translation.json
@@ -2152,7 +2152,15 @@
"bookTitle": "Einen Termin buchen",
"bookDesc": "Vereinbaren Sie einen Besuch bei Ihrem Behandlungsteam.",
"resultsTitle": "Meine Ergebnisse ansehen",
- "resultsDesc": "Prüfen Sie bevorstehende Besuche und ob Ergebnisse bereit sind."
+ "resultsDesc": "Prüfen Sie bevorstehende Besuche und ob Ergebnisse bereit sind.",
+ "walletTitle": "Wallet verknüpfen",
+ "walletDesc": "Nutzen Sie die temetro-App, um selbst zu buchen und Ergebnisse zu sehen."
+ },
+ "wallet": {
+ "title": "Wallet verknüpfen",
+ "subtitle": "Scannen Sie diesen Code mit der temetro-Wallet-App, um sie mit dieser Klinik zu verbinden.",
+ "error": "Der Kopplungscode konnte nicht geladen werden. Bitte fragen Sie an der Rezeption.",
+ "hint": "Nach der Verknüpfung können Sie Termine buchen und Ergebnisse auf Ihrem Telefon ansehen."
},
"field": {
"name": "Vollständiger Name",
diff --git a/frontend/lib/i18n/locales/en/translation.json b/frontend/lib/i18n/locales/en/translation.json
index 27b10d4..8d02a58 100644
--- a/frontend/lib/i18n/locales/en/translation.json
+++ b/frontend/lib/i18n/locales/en/translation.json
@@ -2152,7 +2152,15 @@
"bookTitle": "Book an appointment",
"bookDesc": "Schedule a visit with your care team.",
"resultsTitle": "View my results",
- "resultsDesc": "Check upcoming visits and whether results are ready."
+ "resultsDesc": "Check upcoming visits and whether results are ready.",
+ "walletTitle": "Link my wallet",
+ "walletDesc": "Use the temetro app to book and view results yourself."
+ },
+ "wallet": {
+ "title": "Link your wallet",
+ "subtitle": "Scan this code with the temetro wallet app to connect it to this clinic.",
+ "error": "Couldn't load the pairing code. Please ask the front desk.",
+ "hint": "After linking, you can book appointments and view results from your phone."
},
"field": {
"name": "Full name",
diff --git a/frontend/lib/i18n/locales/fr/translation.json b/frontend/lib/i18n/locales/fr/translation.json
index 21b32a0..7256274 100644
--- a/frontend/lib/i18n/locales/fr/translation.json
+++ b/frontend/lib/i18n/locales/fr/translation.json
@@ -2152,7 +2152,15 @@
"bookTitle": "Prendre un rendez-vous",
"bookDesc": "Planifiez une visite avec votre équipe soignante.",
"resultsTitle": "Voir mes résultats",
- "resultsDesc": "Consultez les prochaines visites et si les résultats sont prêts."
+ "resultsDesc": "Consultez les prochaines visites et si les résultats sont prêts.",
+ "walletTitle": "Lier mon portefeuille",
+ "walletDesc": "Utilisez l'application temetro pour réserver et voir vos résultats vous-même."
+ },
+ "wallet": {
+ "title": "Lier votre portefeuille",
+ "subtitle": "Scannez ce code avec l'application portefeuille temetro pour la connecter à cette clinique.",
+ "error": "Impossible de charger le code d'association. Veuillez demander à l'accueil.",
+ "hint": "Une fois lié, vous pourrez prendre rendez-vous et consulter vos résultats depuis votre téléphone."
},
"field": {
"name": "Nom complet",
diff --git a/frontend/lib/i18n/locales/so/translation.json b/frontend/lib/i18n/locales/so/translation.json
index 1aba66e..f877f42 100644
--- a/frontend/lib/i18n/locales/so/translation.json
+++ b/frontend/lib/i18n/locales/so/translation.json
@@ -2152,7 +2152,15 @@
"bookTitle": "Ballan qabso",
"bookDesc": "Qorshee booqasho kooxdaada daryeelka.",
"resultsTitle": "Eeg natiijooyinkayga",
- "resultsDesc": "Hubi booqashooyinka soo socda iyo haddii natiijooyinku diyaar yihiin."
+ "resultsDesc": "Hubi booqashooyinka soo socda iyo haddii natiijooyinku diyaar yihiin.",
+ "walletTitle": " Isku xir walletkayga",
+ "walletDesc": "Isticmaal abka temetro si aad adigu u ballansato oo aad u aragto natiijooyinka."
+ },
+ "wallet": {
+ "title": "Isku xir walletkaaga",
+ "subtitle": "Ku sawir koodhkan abka wallet-ka temetro si aad ugu xidho rugtan caafimaad.",
+ "error": "Lama soo rari karin koodhka isku xirka. Fadlan weydii miiska hore.",
+ "hint": "Kadib xirka, waxaad ballan ka samaysan kartaa oo natiijooyinka ka arki kartaa taleefankaaga."
},
"field": {
"name": "Magaca oo dhan",
diff --git a/frontend/lib/portal.ts b/frontend/lib/portal.ts
index 9fba313..4502b1d 100644
--- a/frontend/lib/portal.ts
+++ b/frontend/lib/portal.ts
@@ -65,6 +65,30 @@ export function getPortalClinic(clinic: string): Promise {
return portalFetch(`/${encodeURIComponent(clinic)}`);
}
+// The relay-based pairing descriptor the wallet app scans: the clinic's signing
+// public key (relay routing id) + the relay URL. Non-secret values.
+export type PortalLink = {
+ clinicId: string;
+ relay: string;
+ slug: string;
+ name: string;
+};
+
+export function getPortalLink(clinic: string): Promise {
+ return portalFetch(`/${encodeURIComponent(clinic)}/link`);
+}
+
+// Build the `temetro-portal:` URI the wallet app scans to reach this clinic over
+// the Temetro Network relay (no localhost API URL — works from a real phone).
+export function portalPairingUri(link: PortalLink): string {
+ const params = new URLSearchParams({
+ relay: link.relay,
+ clinic: link.clinicId,
+ slug: link.slug,
+ });
+ return `temetro-portal:?${params.toString()}`;
+}
+
export type PortalNewPatient = {
name: string;
sex?: string;