fix(03-04): Telegram LocationManager deep-link — LOCATION SETTINGS CTA on denied cards + locationManagerUpdated chain re-run
This commit is contained in:
+17
-9
@@ -126,15 +126,23 @@ export function buildBootCard(locale: Locale, stage: 1 | 2): HTMLElement {
|
||||
* issue #77) and the retry CTA is .btn-secondary (the RESEARCH Pitfall 4
|
||||
* inversion, recorded as a callout in the UI-SPEC). With opts.awaitingPin
|
||||
* the body swaps to the chat-fallback waiting copy. */
|
||||
export function buildDeniedCard(locale: Locale, opts: { awaitingPin?: boolean } = {}): HTMLElement {
|
||||
return mountHintedCard(
|
||||
locale,
|
||||
"deniedRegister",
|
||||
"deniedHeadline",
|
||||
opts.awaitingPin ? "chatFallbackWaiting" : "deniedBody",
|
||||
"deniedHint",
|
||||
true,
|
||||
);
|
||||
export function buildDeniedCard(
|
||||
locale: Locale,
|
||||
opts: { awaitingPin?: boolean; withLocationSettings?: boolean } = {},
|
||||
): HTMLElement {
|
||||
const card = mountHintedCard(locale, "deniedRegister", "deniedHeadline", opts.awaitingPin ? "chatFallbackWaiting" : "deniedBody", "deniedHint", true);
|
||||
// Debug-round addition (03-DEVICE-MATRIX round 2): Telegram-only recovery
|
||||
// path — opens Telegram's own location-access pane via LocationManager.
|
||||
// Its callback fires locationManagerUpdated; main.ts re-runs the chain.
|
||||
if (opts.withLocationSettings) {
|
||||
const el = document.createElement("button");
|
||||
el.type = "button";
|
||||
el.className = "btn-secondary";
|
||||
el.dataset.role = "open-location-settings";
|
||||
el.textContent = strings[locale].ctaLocationSettings;
|
||||
card.querySelector(".card-actions")?.appendChild(el);
|
||||
}
|
||||
return card;
|
||||
}
|
||||
|
||||
/** SYS-labeled position register — the 45s-staleness card (folds into the
|
||||
|
||||
Reference in New Issue
Block a user