Fix QR code previews not rendering on event and programme pages.
Deploy Ladill Events / deploy (push) Successful in 52s

Remove a duplicate preview ref that targeted a hidden card, enable mobile preview for programmes, and harden customizer init timing.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
isaacclad
2026-06-17 23:39:47 +00:00
co-authored by Cursor
parent 55ea2d506c
commit 9015039e48
4 changed files with 19 additions and 15 deletions
@@ -11,6 +11,7 @@
removeLogo: false,
previewLoading: false,
previewTimer: null,
_qrLibTimer: null,
showPreviewModal: false,
openSection: config.openSection || 'body',
balance: config.balance ?? null,
@@ -59,8 +60,6 @@
this.$watch(field, () => this._reprocessLogo());
});
this.schedulePreview();
if (config.existingLogoUrl) {
this._loadExistingLogo(config.existingLogoUrl);
}
@@ -68,6 +67,12 @@
this.$watch('showPreviewModal', (val) => {
if (val) this.schedulePreview();
});
if (this.wizard) {
this.$watch('step', () => this.$nextTick(() => this.schedulePreview()));
}
this.$nextTick(() => this.schedulePreview());
},
toggleSection(id) {
this.openSection = this.openSection === id ? null : id;
@@ -441,8 +446,13 @@
} catch (_) { /* silent */ }
},
refreshPreview() {
if (typeof window.QRCodeStyling === 'undefined') return;
if (typeof window.QRCodeStyling === 'undefined') {
clearTimeout(this._qrLibTimer);
this._qrLibTimer = setTimeout(() => this.refreshPreview(), 100);
return;
}
clearTimeout(this._qrLibTimer);
this.previewLoading = true;
try {
@@ -659,11 +669,7 @@
}));
};
if (window.Alpine) {
registerQrCustomizer();
} else {
document.addEventListener('alpine:init', registerQrCustomizer);
}
document.addEventListener('alpine:init', registerQrCustomizer);
})();
</script>
@endonce