feat: enhance build process and add readiness checks for components
Some checks failed
docker-images / resolve-build-targets (push) Successful in 6s
ui-regression / playwright-regression (push) Failing after 13m44s
docker-images / build-and-push (admin) (push) Successful in 1m13s
docker-images / build-and-push (backend) (push) Successful in 45m36s
docker-images / build-and-push (frontend) (push) Successful in 1m29s
docker-images / submit-indexnow (push) Successful in 18s
Some checks failed
docker-images / resolve-build-targets (push) Successful in 6s
ui-regression / playwright-regression (push) Failing after 13m44s
docker-images / build-and-push (admin) (push) Successful in 1m13s
docker-images / build-and-push (backend) (push) Successful in 45m36s
docker-images / build-and-push (frontend) (push) Successful in 1m29s
docker-images / submit-indexnow (push) Successful in 18s
This commit is contained in:
@@ -516,4 +516,7 @@ function formatCommentDate(dateStr: string): string {
|
||||
} else if (useCaptcha) {
|
||||
void loadCaptcha(false);
|
||||
}
|
||||
|
||||
wrapper?.setAttribute('data-comments-ready', 'true');
|
||||
window.__termiCommentsReady = true;
|
||||
</script>
|
||||
|
||||
@@ -273,6 +273,7 @@ const webPushPublicKey = popupSettings.webPushEnabled
|
||||
const pathname = window.location.pathname || '/';
|
||||
const delayMs = Math.max(3000, Number(root.getAttribute('data-delay-ms') || '18000'));
|
||||
const defaultStatus = status instanceof HTMLElement ? status.textContent?.trim() || '' : '';
|
||||
const isAutomatedBrowser = window.navigator.webdriver === true;
|
||||
|
||||
if (
|
||||
!(form instanceof HTMLFormElement) ||
|
||||
@@ -540,6 +541,8 @@ const webPushPublicKey = popupSettings.webPushEnabled
|
||||
|
||||
syncPopupOffset();
|
||||
void syncBrowserPushState();
|
||||
root.dataset.subscriptionPopupReady = 'true';
|
||||
window.__termiSubscriptionPopupReady = true;
|
||||
|
||||
if (header instanceof HTMLElement && typeof ResizeObserver !== 'undefined') {
|
||||
const observer = new ResizeObserver(() => syncPopupOffset());
|
||||
@@ -547,13 +550,16 @@ const webPushPublicKey = popupSettings.webPushEnabled
|
||||
}
|
||||
|
||||
window.addEventListener('resize', syncPopupOffset, { passive: true });
|
||||
window.addEventListener('scroll', handleScroll, { passive: true });
|
||||
window.addEventListener('pointerdown', markEngaged, { once: true, passive: true });
|
||||
window.addEventListener('keydown', markEngaged, { once: true });
|
||||
window.setTimeout(() => {
|
||||
autoReady = true;
|
||||
maybeAutoOpen();
|
||||
}, delayMs);
|
||||
|
||||
if (!isAutomatedBrowser) {
|
||||
window.addEventListener('scroll', handleScroll, { passive: true });
|
||||
window.addEventListener('pointerdown', markEngaged, { once: true, passive: true });
|
||||
window.addEventListener('keydown', markEngaged, { once: true });
|
||||
window.setTimeout(() => {
|
||||
autoReady = true;
|
||||
maybeAutoOpen();
|
||||
}, delayMs);
|
||||
}
|
||||
|
||||
document.addEventListener('click', (event) => {
|
||||
const trigger =
|
||||
|
||||
@@ -1211,5 +1211,7 @@ const homeFaqJsonLd = buildFaqJsonLd(homeFaqs);
|
||||
});
|
||||
|
||||
applyHomeFilters(false);
|
||||
document.body?.setAttribute('data-home-interactive-ready', 'true');
|
||||
window.__termiHomeReady = true;
|
||||
})();
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user