From a96046fa035e6c3b2b5253e53b9f11957e3573d3 Mon Sep 17 00:00:00 2001
From: "dobby-yivi-agent[bot]"
<275734547+dobby-yivi-agent[bot]@users.noreply.github.com>
Date: Sat, 9 May 2026 14:08:18 +0000
Subject: [PATCH] fix: open Yivi app on mobile decrypt page instead of QR
The /decrypt fallback page rendered a QR code on mobile, which is
useless when the user is already on their phone. Mirror the /download
page's pattern: detect mobile and pass mode=deeplink to YiviQRCode so
it auto-clicks the Yivi-app button and triggers the universal link.
Closes #163
---
src/lib/components/fallback/Decrypt.svelte | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/lib/components/fallback/Decrypt.svelte b/src/lib/components/fallback/Decrypt.svelte
index 4d98a5e..19c2c03 100644
--- a/src/lib/components/fallback/Decrypt.svelte
+++ b/src/lib/components/fallback/Decrypt.svelte
@@ -14,6 +14,7 @@
import YiviQRCode from '$lib/components/filesharing/YiviQRCode.svelte'
import Chip from '$lib/components/Chip.svelte'
+ import { isMobile } from '$lib/browser-detect'
const STATES = {
Uninit: 'Uninit',
@@ -26,6 +27,7 @@
}
let decryptState = $state(STATES.Uninit)
+ const isMobileDevice = isMobile()
let policies = $state()
let keylist = $state()
@@ -304,7 +306,11 @@
{/each}
{/if}
-