fix(03-04): LOCATION SETTINGS CTA version-gated 8.0+ — hides the no-op off-Telegram (Chrome SDK stub reports 6.0)

This commit is contained in:
araharah-executor
2026-10-23 01:43:34 +08:00
parent e64cf7003b
commit 19a51e5882
+3 -2
View File
@@ -29,6 +29,7 @@ import { createFollowController } from "./map/follow.ts";
import { createStatusStrip } from "./ui/strip.ts"; import { createStatusStrip } from "./ui/strip.ts";
import { buildBootCard, buildDeniedCard, buildSignalLostCard, startGantry, stopGantry } from "./ui/cards.ts"; import { buildBootCard, buildDeniedCard, buildSignalLostCard, startGantry, stopGantry } from "./ui/cards.ts";
import { createProbe } from "./ui/probe.ts"; import { createProbe } from "./ui/probe.ts";
import { telegramLocationSupported } from "./location/telegram.ts";
import { createRecenterControl } from "./ui/recenter.ts"; import { createRecenterControl } from "./ui/recenter.ts";
import { getWebApp } from "./telegram/webapp.ts"; import { getWebApp } from "./telegram/webapp.ts";
import { watchTheme } from "./telegram/theme.ts"; import { watchTheme } from "./telegram/theme.ts";
@@ -109,7 +110,7 @@ async function boot(): Promise<void> {
const deniedCard = buildDeniedCard( const deniedCard = buildDeniedCard(
locale, locale,
// Debug round 2/3: Telegram-only deep-link via LocationManager.openSettings. // Debug round 2/3: Telegram-only deep-link via LocationManager.openSettings.
{ awaitingPin: false, withLocationSettings: wa?.LocationManager !== undefined }, { awaitingPin: false, withLocationSettings: telegramLocationSupported(wa) },
); );
const awaitingCard = buildDeniedCard( const awaitingCard = buildDeniedCard(
locale, locale,
@@ -117,7 +118,7 @@ async function boot(): Promise<void> {
// is the whole eligibility test — off-Telegram (Desktop/browser) there // is the whole eligibility test — off-Telegram (Desktop/browser) there
// is nothing for openSettings() to open, and navigator.geolocation // is nothing for openSettings() to open, and navigator.geolocation
// denial is handled by the OS settings hint copy instead. // denial is handled by the OS settings hint copy instead.
{ awaitingPin: true, withLocationSettings: wa?.LocationManager !== undefined }, { awaitingPin: true, withLocationSettings: telegramLocationSupported(wa) },
); );
const lostCard = buildSignalLostCard(locale); const lostCard = buildSignalLostCard(locale);
const gantryOf = (card: HTMLElement): HTMLElement => { const gantryOf = (card: HTMLElement): HTMLElement => {