Hide APK download link on the native Android app
Some checks failed
Build TWA APK / build-apk (push) Has been cancelled
Build & Push Docker Image / build (push) Has been cancelled

The "Download Android app (APK)" link on the login page is pointless
when the user is already inside the Capacitor app. Wrapped the link
in id="apk-download-link" and added a native-app-only hide pass in
auth.js that runs against a short array of web-only element IDs.

Add more entries to that array as other web-only UI appears, so the
mobile wrapper can diverge cleanly from the web UI without branching
the HTML.
This commit is contained in:
Daniel 2026-04-14 22:47:59 +02:00
parent b4704944cb
commit 77bd7c5b1c
2 changed files with 11 additions and 1 deletions

View file

@ -115,7 +115,7 @@
<span>HIPAA-compliant AI providers available with BAA. Check with your institution's guidelines before use. Not intended for production clinical use without proper authorization.</span>
</div>
<div style="text-align:center;margin:14px 0 0;font-size:13px;">
<div id="apk-download-link" style="text-align:center;margin:14px 0 0;font-size:13px;">
<a href="https://github.com/ifedan-ed/pediatric-ai-scribe-v3/releases/latest" target="_blank" rel="noopener" style="color:#2563eb;text-decoration:none;font-weight:500;">
<i class="fas fa-mobile-screen"></i> Download Android app (APK)
</a>

View file

@ -29,6 +29,16 @@ document.addEventListener('DOMContentLoaded', function() {
}
window.IS_NATIVE_APP = isNativeApp();
// Hide elements that only make sense for the web audience (e.g. the
// "Download Android APK" link on the login page — you're already in
// the app). Add more element IDs here as other web-only UI appears.
if (isNativeApp()) {
['apk-download-link'].forEach(function(id) {
var el = document.getElementById(id);
if (el) el.style.display = 'none';
});
}
// Auth module initialized
// Make sure forms are visible/hidden correctly on load