feat(neode-ui): route "open in browser" through native bridge in companion app
When ArchipelagoNative is present (the Android companion app), openInNewTab() now calls openInApp(url) so non-iframeable apps open in the in-app WebView instead of a suppressed window.open popup. Falls back to window.open in a plain mobile browser. Logic only; no visual change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
b5a9deb815
commit
d1fbcd9b0a
@ -304,9 +304,17 @@ function refreshIframe() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function openInNewTab() {
|
function openInNewTab() {
|
||||||
if (store.url) {
|
if (!store.url) return
|
||||||
window.open(store.url, '_blank', 'noopener,noreferrer')
|
// Inside the Archipelago companion app, open the app in the in-app WebView
|
||||||
|
// instead of window.open — which the WebView suppresses for noopener popups
|
||||||
|
// (so the tap silently no-ops). The native bridge is reliable; fall back to
|
||||||
|
// window.open in a plain mobile browser.
|
||||||
|
const native = (window as any).ArchipelagoNative
|
||||||
|
if (native && typeof native.openInApp === 'function') {
|
||||||
|
native.openInApp(store.url)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
window.open(store.url, '_blank', 'noopener,noreferrer')
|
||||||
}
|
}
|
||||||
|
|
||||||
function openInNewTabAndClose() {
|
function openInNewTabAndClose() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user