fix(03-04): web_app menu button on deployed origin + wire CTA actions on both denied-shaped cards
This commit is contained in:
+15
-8
@@ -113,14 +113,21 @@ async function boot(): Promise<void> {
|
||||
let tickStarted = false;
|
||||
let chainInFlight = false;
|
||||
|
||||
const retryButton = deniedCard.querySelector(".btn-secondary");
|
||||
if (retryButton instanceof HTMLButtonElement) {
|
||||
retryButton.addEventListener("click", () => void runFromSession()); // D-06: re-runs from link 1
|
||||
}
|
||||
const askButton = deniedCard.querySelector(".btn-primary");
|
||||
if (askButton instanceof HTMLButtonElement) {
|
||||
askButton.addEventListener("click", () => void askViaChat()); // D-06: the Desktop Telegram path
|
||||
}
|
||||
// D-06: BOTH denied-shaped instances get live CTAs. 'denied-then-waiting'
|
||||
// is a second buildDeniedCard instance (03-03 stub note) — wiring only the
|
||||
// first left TRY AGAIN / ASK VIA CHAT dead on the awaiting-pin card.
|
||||
const wireDeniedActions = (card: HTMLElement): void => {
|
||||
const retryButton = card.querySelector(".btn-secondary");
|
||||
if (retryButton instanceof HTMLButtonElement) {
|
||||
retryButton.addEventListener("click", () => void runFromSession()); // re-runs from link 1
|
||||
}
|
||||
const askButton = card.querySelector(".btn-primary");
|
||||
if (askButton instanceof HTMLButtonElement) {
|
||||
askButton.addEventListener("click", () => void askViaChat()); // the Desktop Telegram path
|
||||
}
|
||||
};
|
||||
wireDeniedActions(deniedCard);
|
||||
wireDeniedActions(awaitingCard);
|
||||
|
||||
function showCard(card: HTMLElement | null, register: "center" | "bottom" = "center"): void {
|
||||
if (card !== null) {
|
||||
|
||||
Reference in New Issue
Block a user