2026-08-12 10:55:50 +00:00
|
|
|
import { ref } from 'vue'
|
|
|
|
|
|
2026-08-31 12:56:32 +01:00
|
|
|
import { isCompanionApp } from '@/utils/openExternal'
|
|
|
|
|
|
2026-08-12 10:55:50 +00:00
|
|
|
/**
|
|
|
|
|
* 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.
|
2026-08-31 12:56:32 +01:00
|
|
|
*
|
|
|
|
|
* 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).
|
2026-08-12 10:55:50 +00:00
|
|
|
*/
|
|
|
|
|
export const companionIntroRequested = ref(false)
|
|
|
|
|
|
|
|
|
|
export function openCompanionIntro(): void {
|
2026-08-31 12:56:32 +01:00
|
|
|
if (isCompanionApp()) return
|
2026-08-12 10:55:50 +00:00
|
|
|
companionIntroRequested.value = true
|
|
|
|
|
}
|