fix(web): companion-gate the store banner + manual intro trigger (#61 residual)

Only the auto-popup was companion-gated — inside the companion WebView
users still saw the 'install the companion' banner in the App Store and
could pop the intro overlay through it. Gates all three paths on
isCompanionApp(): CompanionBanner self-hides, openCompanionIntro() is a
no-op, and the manual-open watcher in CompanionIntroOverlay refuses to
open (the overlay's raw window check also moves to the canonical helper
so there is exactly one detection). No APK change.
This commit is contained in:
Dorian
2026-08-31 12:56:32 +01:00
parent 966db4810a
commit d259f3cbb9
4 changed files with 65 additions and 3 deletions
@@ -1,13 +1,20 @@
import { ref } from 'vue'
import { isCompanionApp } from '@/utils/openExternal'
/**
* Cross-view trigger for the Remote Companion intro/pairing modal
* (CompanionIntroOverlay, mounted once in Dashboard.vue). Views like the
* App Store banner call openCompanionIntro() to pop it on demand — this
* bypasses the once-per-browser auto-show gate.
*
* Inside the companion app's own WebView the whole pitch is nonsense — the
* user is already running it — so the trigger is a no-op there (#61: the
* auto-popup was gated, this manual path and CompanionBanner weren't).
*/
export const companionIntroRequested = ref(false)
export function openCompanionIntro(): void {
if (isCompanionApp()) return
companionIntroRequested.value = true
}